Development uses OS: MacOS Language: Ruby, Framework: Ruby on Rails (coding HTML with erb) DB: PostgreSQL.

The following is the version.

Heroku-v: 7.35.0 darwin-x64
node.js -v: 10.16.3
postgreSQL -v: 12.1
rails -v: 5.2.4
ruby -v: 2.5.1p57 [x86_64-darwin19]

I want to solve:

Heroku open error resolution
An error has occurred in ActionView

Error content:

Check with Heroku log
Completed 500 Internal Server Error in 181ms (ActiveRecord: 17.1ms)
ActionView :: Template :: Error (The asset "logo.png" is not present in the asset pipeline.):
<% = image_tag 'logo.png', alt: 'logo', width: '50px'%>

Something confirmed for resolution:

①image_tag Check log entry for "logo.png"
② Confirm that there are also images in asset/images
③ Insert the same image image into public/assets
④ Change environment/production.rb to config.assets.compile = FALSE to true
⑤ Add config.assets.initialize_on_precompile = false to class Application of config/application.rb
⑥ After adding ⑤, execute $rake assets: precompile,
yarn install v1.19.1
info No lockfile found.

  • Answer # 1

    You can display it by adding/images/in front of the image.
    Thank you very much.