Rails/heroku 路线错误 /stylesheets/all.css
我是 Rails 新手,对 Heroku 也很陌生,但我最近在 Heroku 上托管了我的应用程序,并在我的日志中收到以下错误:
Started GET "/stylesheets/all.css" for ...
ActionController::RoutingError (No route matches "/stylesheets/all.css"):
我偶然发现了这个论坛 (http://railsforum.com/viewtopic.php ?id=38540),有人能够通过在其 config/environments/prodcution.rb
中设置 config.serve_static_assets = true
来解决类似的问题,但这并没有解决不适合我。有人对此有什么想法吗?澄清一下,我只在生产中遇到此错误,而不是在开发中遇到此错误。谢谢。
另外,相当有趣的是,我实际上能够毫无问题地访问 /stylesheets/styles.css
...
I'm new to rails and very new to Heroku, but I've recently hosted my app up on Heroku and am getting the following error in my log:
Started GET "/stylesheets/all.css" for ...
ActionController::RoutingError (No route matches "/stylesheets/all.css"):
I stumbled across this forum (http://railsforum.com/viewtopic.php?id=38540) where someone was able to fix a similar problem by setting config.serve_static_assets = true
in their config/environments/prodcution.rb
, but this did not work for me. Does anyone have any thoughts on this? To clarify, I only get this error in production, not in dev. Thanks.
Also, rather interesting is that I am actually able to access /stylesheets/styles.css
with no problem...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不直接添加一个空白的
all.css
文件呢?Why not just add a blank
all.css
file?