Failed to start Shopify app in Nginx and Passenger

Highlighted
New Member
1 0 0
Hi, 

I followed the sample app https://github.com/Shopify/shopify_app and created my first Shopify app. 
Everything works as expected if i start the app using command bundle exec rails server. 
I can install the app for my test store and redirection to my admin portal works. 
However, I run into the following issue when I start my app in Nginx. 
After I install the app for the test store, it always redirect to http://localhost/login. 

Found the FATAL errors in production.log.

[2018-09-17T00:52:48.227551 #18946] FATAL -- : [a942f01f-b3f9-46ff-8feb-5cea6a4763fd] ActionView::Template::Error (The asset "shopify_app/redirect.js" is not present in the asset pipeline.):
F, [2018-09-17T00:52:48.227907 #18946] FATAL -- : [a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     4:   <meta charset="utf-8" />
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     5:   <base target="_top">
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     6:   <title>Redirecting…</title>
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     7:   <%= javascript_include_tag('shopify_app/redirect', crossorigin: 'anonymous', integrity: true) %>
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     8: </head>
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]     9: <body>
[a942f01f-b3f9-46ff-8feb-5cea6a4763fd]    10:   <%=
F, [2018-09-17T00:52:48.228170 #18946] FATAL -- : [a942f01f-b3f9-46ff-8feb-5cea6a4763fd]   
F, [2018-09-17T00:52:48.228443 #18946] FATAL -- : [a942f01f-b3f9-46ff-8feb-5cea6a4763fd] sprockets-rails (3.2.1) lib/sprockets/rails/helper.rb:83:in `compute_asset_path'
0 Likes