【发布时间】:2014-12-09 08:34:46
【问题描述】:
尝试在 heroku 中打开我的应用时,我收到以下屏幕提示:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
出现错误的日志如下:
2014-10-14T13:43:20.222314+00:00 heroku[路由器]: at=error code=H10 desc="应用程序崩溃" 方法=GET 路径="/" 主机=dry-reaches-7872.herokuapp.com request_id=5356a97b-0f65-4af0-947b-fe1c42418c1d fwd="74.118.24.162" 测功机=连接=服务=状态=503字节= 2014-10-14T13:43:20.334555+00:00 heroku[路由器]: at=error code=H10 desc="应用程序崩溃" 方法=GET path="/favicon.ico" 主机=dry-reaches-7872.herokuapp.com request_id=768945b5-b9b6-4a0b-ba4f-fa0e389d4a29 fwd="74.118.24.162" 测功机=连接=服务=状态=503字节= 2014-10-14T13:47:16.518787+00:00 heroku[路由器]: at=error code=H10 desc="应用程序崩溃" 方法=GET 路径="/" 主机=dry-reaches-7872.herokuapp.com request_id=3931e254-4f51-4c90-954a-6bbbf4fe4298 fwd="74.118.24.162" 测功机=连接=服务=状态=503字节= 2014-10-14T13:47:16.734809+00:00 heroku[路由器]: at=error code=H10 desc="应用程序崩溃" 方法=GET path="/favicon.ico" 主机=dry-reaches-7872.herokuapp.com request_id=69b7e4bb-3953-46af-b608-1625c7556152 fwd="74.118.24.162" dyno=连接=服务=状态=503字节=
我尝试在我的项目中使用 devise 进行身份验证但失败了,我认为错误是 devise 中的一些代码
【问题讨论】:
-
您可以从终端运行
heroku logs来检查错误是什么吗?您是否已经迁移了生产数据库?heroku run rake db:migrate? -
我运行了迁移,我收到以下错误: NameError: uninitialized constant Devise 它告诉我转到 /app/config/initializers/devise,第 3 行,它属于设计,Devise.setup做 |配置|那里的一切似乎都是正确的。
-
你的 Gemfile 中有
gem 'devise'吗?
标签: ruby-on-rails heroku devise