【问题标题】:heroku application error, possibly deviseheroku 应用程序错误,可能设计
【发布时间】: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


【解决方案1】:

您应该在 Gemfile 中包含设计 gem。将此行添加到您的 Gemfile 并运行 bundle install

gem 'devise'

【讨论】:

    猜你喜欢
    • 2015-03-20
    • 2011-12-18
    • 2013-08-05
    • 2016-04-01
    • 2017-01-30
    • 2018-02-17
    • 2014-11-19
    • 2014-03-12
    • 2015-10-31
    相关资源
    最近更新 更多