我在Heroku上有一个应用程序,在我更新到Rails 4.1.0之后,我看到了这些RoutingError
的异常:
Started GET "/assets/Elusive-Icons-5997c1a6679785a96defc4f57a3f2ff5.svg" for 177.16.216.169 at 2014-04-12 21:56:41 +0000
2014-04-12T21:56:41.397071+00:00 app[web.1]:
2014-04-12T21:56:41.397071+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/Elusive-Icons-5997c1a6679785a96defc4f57a3f2ff5.svg"):
我安装了rails_12factor,并尝试将config.serve_static_assets = true
放在applicationl.rb
上但没有效果。我错过了什么?
答案 0 :(得分:1)
正如评论中所提到的,你应该将它输入你的cmd:rake assets:precompile RAILS_ENV=production
- 这一点,加上部署到Heroku,应该解决问题