40

Rails 3.2.3

In production mode I have an error and it displays standard "we're sorry" page. In development mode there is no error.

I need to get more information about the error so I want to turn off "we're sorry" page and see the error. I know it has to be lauched as "rails s -e production" and I do it at my local computer. But how can turn off "we're sorry" page?

4

3 回答 3

82

在 config/environments/production.rb

暂时改变

  config.consider_all_requests_local       = false

  config.consider_all_requests_local       = true
于 2012-07-22T17:09:59.720 回答
6

查看登录log/production.log。通常这与资产有关,也许您需要放入gem 'therubyracer'Gemfile。

错误页面由机架中间件中的一些条目显示(我相信ActionDispatch::ShowExceptionsActionDispatch::DebugExceptions)。您可以随时将它们添加到您的应用程序中,但检查日志可能更容易。“关闭”页面实际上意味着添加内容以显示异常页面。

于 2012-07-22T15:22:53.980 回答
1

我总是忘记为SECRET_KEY_BASE. 看config/secrets.yml

于 2016-11-29T18:19:57.190 回答