Heroku:您要查找的页面不存在
当我尝试将我的应用程序部署到Heroku时,我收到此错误。 在我做heroku run rake db:reset
之前,我的第一次部署工作正常。 在此之后,我有以下错误:“我们很抱歉,但出了点问题。” 和“您正在寻找的页面不存在。您可能输错了地址或页面可能已移动。”
我的heroku日志说:
2012-12-08T11:40:54+00:00 app[web.1]: ActionView::Template::Error (bootstrap.css isn't precompiled): 2012-12-08T11:40:54+00:00 app[web.1]: 9: 2012-12-08T11:40:54+00:00 app[web.1]: 2012-12-08T11:40:54+00:00 app[web.1]: 8:
有一个,你能帮助我吗?
看起来Heroku抱怨您的资产没有预编译。 我通过本教程阅读了关于heroku的rails,有一节专门介绍资源预编译。
您可以告诉您的应用程序在生产中预编译资产
#config/environments/production.rb config.assets.compile = true # Heroku also requires this to be false config.assets.initialize_on_precompile=false
或者您可以使用rake任务预编译资产
#before pushing to Heroku and then you can push rake assets:precompile #or after you've pushed to heroku heroku run rake assets:precompile