After gem update: test fail with “Asset was not declared to be precompiled in production”

后端 未结 4 937
臣服心动
臣服心动 2020-12-24 10:41

Since I updated several gems all tests fail with the error:

ActionView::Template::Error: Asset was not declared to be precompiled in production.

A

4条回答
  •  心在旅途
    2020-12-24 11:21

    I got a similar error. I did not modify assets.rb or anything, just restart my server and no error anymore.


    ActionView::Template::Error (Asset was not declared to be precompiled in production. Add Rails.application.config.assets.precompile += %w( rails.png ) to config/initializers/assets.rb and restart your server): 10: <%= link_to "Sign up now!", '#', class: "btn btn-lg btn-primary" %> 11: 12: 13: <%= link_to image_tag("rails.png", alt: "Rails logo"), 14: 'http://rubyonrails.org/' %> app/views/static_pages/home.html.erb:13:in `_app_views_static_pages_home_html_erb___1806898863626708249_70312070486240'

提交回复
热议问题