Rails:隐藏生产环境中的错误错误

时间:2016-07-01 07:52:53

标签: ruby-on-rails ruby ruby-on-rails-4

我使用Apache的乘客模块运行我的rails应用程序(Rails 4.2.x)。

有没有办法不显示错误消息:

enter image description here

感谢。

3 个答案:

答案 0 :(得分:2)

确保config/environment/production.rb文件中的以下设置设为false:

config.consider_all_requests_local = false

答案 1 :(得分:1)

不要像这样运行你的生产模式,你可能会认为它会显示这样的错误。但是你在日志中得到了所有错误。

检查log / production.log以查找错误。

答案 2 :(得分:1)

确保config/environments/production.rb文件中包含以下设置:

config.consider_all_requests_local       = false
相关问题