small medium large xlarge

Generic-user-small
31 Jul 2017, 08:55
John Yeates (8 posts)

At the end of iteration L1, it says “At this point, you’re up and running.” However, I get Passenger’s “something went wrong” page. The production.log has the following lines:

I, [2017-07-30T11:11:44.195722 #35354]  INFO -- : [e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]   Rendered store/index.html.erb within layouts/application (84.5ms)
I, [2017-07-30T11:11:44.196093 #35354]  INFO -- : [e3b8f2fd-8293-41a4-b05c-60bc6475ccdd] Completed 500 Internal Server Error in 210ms (ActiveRecord: 121.5ms)
F, [2017-07-30T11:11:44.197243 #35354] FATAL -- : [e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]   
F, [2017-07-30T11:11:44.197331 #35354] FATAL -- : [e3b8f2fd-8293-41a4-b05c-60bc6475ccdd] ActionView::Template::Error (The asset "dcbang.jpg" is not present in the asset pipeline.):
F, [2017-07-30T11:11:44.197514 #35354] FATAL -- : [e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]      6:   <% @products.each do |product| %>
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]      7:     <% cache product do %>
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]      8:       <div class="entry">
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]      9:         <%= image_tag product.image_url %>
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]     10:         <h3><%= product.title %></h3>
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]     11:         <%= sanitize product.description %>
[e3b8f2fd-8293-41a4-b05c-60bc6475ccdd]     12:         <div class="price_line">

I’ve tried running rails assets:precompile, even though this isn’t mentioned in the book, but it hasn’t helped. What am I missing here?

(app/assets/images/dcbang.jpg is present :)

The book goes into a lot of details on possible causes of problems when running rails db:setup, but it’s a bit light on troubleshooting tips for Passenger itself, including common booby-traps like file permissions. Would it be possible to expand on that in a future edition?

UPDATE: It looks like I should have run rails assets:precompile RAILS_ENV=production there — but I pulled most of the deployment back and followed the instructions at the Phusion Passenger tutorial instead, so I’m not sure if that’s the only change I made…

You must be logged in to comment