Reputation: 11
I have completed my own portfolio website and went to push it to heroku. When I go to open the app it only showed a message saying: "We're sorry, but something went wrong. If you are the application owner check the logs for more information."
I go to the logs to find the following:
2019-12-05T20:48:19.073805+00:00 app[api]: Release v12 created by user [email protected]
2019-12-05T20:48:20.807481+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-12-05T20:48:20.827961+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2019-12-05T20:48:20.837442+00:00 app[web.1]: === puma shutdown: 2019-12-05 20:48:20 +0000 ===
2019-12-05T20:48:20.837477+00:00 app[web.1]: - Goodbye!
2019-12-05T20:48:20.837580+00:00 app[web.1]: Exiting
2019-12-05T20:48:20.997538+00:00 heroku[web.1]: Process exited with status 143
2019-12-05T20:48:23.000000+00:00 app[api]: Build succeeded
2019-12-05T20:48:25.932772+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 50560 -e production`
2019-12-05T20:48:30.466944+00:00 heroku[web.1]: State changed from starting to up
2019-12-05T20:55:35.903187+00:00 heroku[router]: at=info method=GET path="/" host=mike-v-kc.herokuapp.com request_id=202b0338-916d-41e9-8a28-bc508ae4f77e fwd="136.35.45.198" dyno=web.1 connect=1ms service=85ms status=500 bytes=1827 protocol=https
2019-12-05T20:55:35.822596+00:00 app[web.1]: => Booting Puma
2019-12-05T20:55:35.822624+00:00 app[web.1]: => Rails 5.2.3 application starting in production
2019-12-05T20:55:35.822626+00:00 app[web.1]: => Run `rails server -h` for more startup options
2019-12-05T20:55:35.822628+00:00 app[web.1]: Puma starting in single mode...
2019-12-05T20:55:35.822629+00:00 app[web.1]: * Version 3.12.1 (ruby 2.5.3-p105), codename: Llamas in Pajamas
2019-12-05T20:55:35.822631+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-12-05T20:55:35.822632+00:00 app[web.1]: * Environment: production
2019-12-05T20:55:35.822634+00:00 app[web.1]: * Listening on tcp://0.0.0.0:50560
2019-12-05T20:55:35.822635+00:00 app[web.1]: Use Ctrl-C to stop
2019-12-05T20:55:35.822668+00:00 app[web.1]: I, [2019-12-05T20:55:35.822469 #4] INFO -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] Started GET "/" for 136.35.45.198 at 2019-12-05 20:55:35 +0000
2019-12-05T20:55:35.823931+00:00 app[web.1]: I, [2019-12-05T20:55:35.823856 #4] INFO -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] Processing by PagesController#home as HTML
2019-12-05T20:55:35.899593+00:00 app[web.1]: I, [2019-12-05T20:55:35.899470 #4] INFO -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] Rendering pages/home.html.erb within layouts/application
2019-12-05T20:55:35.901585+00:00 app[web.1]: I, [2019-12-05T20:55:35.901503 #4] INFO -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] Rendered pages/home.html.erb within layouts/application (1.8ms)
2019-12-05T20:55:35.901791+00:00 app[web.1]: I, [2019-12-05T20:55:35.901732 #4] INFO -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] Completed 500 Internal Server Error in 78ms (ActiveRecord: 27.1ms)
2019-12-05T20:55:35.902482+00:00 app[web.1]: F, [2019-12-05T20:55:35.902425 #4] FATAL -- : [202b0338-916d-41e9-8a28-bc508ae4f77e]
2019-12-05T20:55:35.902547+00:00 app[web.1]: F, [2019-12-05T20:55:35.902484 #4] FATAL -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] ActionView::Template::Error (The asset "lipic" is not present in the asset pipeline.):
2019-12-05T20:55:35.902689+00:00 app[web.1]: F, [2019-12-05T20:55:35.902642 #4] FATAL -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] 17: <div class="little-break"></div>
2019-12-05T20:55:35.902691+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 18: <div class="case">
2019-12-05T20:55:35.902693+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 19: <div class="intro-message">
2019-12-05T20:55:35.902694+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 20: <%= image_tag "lipic", alt: "profile picture", class: "avatar-large intro-item" %>
2019-12-05T20:55:35.902730+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 21: <h4 class="intro-item">I can help you bring your <span id="product-text"></span><br/>to life on the web! I specialize in progressive web apps, and UX/UI design. I love to work on projects that are forward thinking, and focus on providing a true value to the world.</h4>
2019-12-05T20:55:35.902733+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 22: </div>
2019-12-05T20:55:35.902734+00:00 app[web.1]: [202b0338-916d-41e9-8a28-bc508ae4f77e] 23: </div>
2019-12-05T20:55:35.902739+00:00 app[web.1]: F, [2019-12-05T20:55:35.902688 #4] FATAL -- : [202b0338-916d-41e9-8a28-bc508ae4f77e]
2019-12-05T20:55:35.902811+00:00 app[web.1]: F, [2019-12-05T20:55:35.902737 #4] FATAL -- : [202b0338-916d-41e9-8a28-bc508ae4f77e] app/views/pages/home.html.erb:20:in `_app_views_pages_home_html_erb__2959833181682875841_47232033230540'
The only real error message that I can make out is that "The asset 'lipic' is not present in the asset pipeline.
So I tried googling for similar problems. Can't really find anything that matches. Came across some information that would have been useful if I was on rails 3 or 4. But I am using rails 5, which is supposed to have this automatic process of serving the static assets automatically...(recalling the best I can). This sounds like it could be related.
I also, removed the line from the view calling that specific image and it just repeated the same issue for the following picture that was being referenced from the asset pipeline.
Does anybody know if I am missing something here? Was I supposed to do something my assets before pushing to heroku using rails 5?
Upvotes: 0
Views: 54
Reputation: 231
The error is happening at this line:
<%= image_tag "lipic", alt: "profile picture", class: "avatar-large intro-item" %>
This is looking for an image in the location assets/lipic
. Make sure you actually have your image in that location. If the image is there and you are still getting the error, try checking to make sure these two lines are in your production.rb
file:
config.assets.compile = true
config.assets.digest = true
Upvotes: 1