【发布时间】:2015-01-24 22:31:20
【问题描述】:
不断发生应用程序错误:
2014-11-26T06:45:10.349830+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
在我的 application.html 我有:
<%= stylesheet_link_tag "application" %>
在我的 production.rb 中,因为 heroku 没有提供服务,应用程序应该提供我拥有的静态资产:
config.serve_static_assets = true
config.assets.compile = true
在我拥有的实时网站上:
<link href="/assets/application-da7e0e08bb87fbae6f1225fa189fab8e.css" media="screen" rel="stylesheet" type="text/css" />
网址
mysite/assets/application-da7e0e08bb87fbae6f1225fa189fab8e.css
返回一个结果。
网址
mysite/assets/application.css
也返回一个结果。
一切正常,但日志中有此错误消息,我不明白为什么。谁请求 /stylesheets/application.css 以及为什么以及如何阻止此错误发生。
Rails 是“3.2.16”
【问题讨论】:
标签: ruby-on-rails heroku asset-pipeline