Search code examples
reactjsruby-on-railsviteshopify-appshopify-template

Shopify CLI 3.0 Ruby app not rendering UI in production


I've been trying to deploy the default shopify rails+react app generated via shopify cli

Deployment is successful but the UI doesn't get rendered. I get a blank screen with the message "This app does not appear to be loading and may be outdated. Try reloading the app in the legacy admin or contact the app's developer to update the app."

The same issue persists when I load the app in legacy admin (.myshopify.com/admin instead of admin.myshopify.com/)

blank screen with error message

For now, I've tried the following:

  1. Running the Dockerfile locally
  2. Run all commands from Dockerfile locally - bundle install, npm install, rake build:all and rails server -b 0.0.0.0 -e production
  3. Deploy the app to production on cloud66 (which runs the default Dockerfile)

All 3 have the same issue. Don't see any errors in Rails logs as well.

Can anyone help please?


Solution

  • Turns out I missed RAILS_SERVE_STATIC_FILES flag as mentioned here. Not sure why it needs to be added explicitly, but it worked after I added it!