User-friendly error pages not displaying in production environment

时光毁灭记忆、已成空白 提交于 2019-12-01 04:59:55

问题


Recently my user friendly error pages stopped displaying for my production environment. I am using rails 3.0.3.

I have the following in my config/environments/production.rb:

config.action_controller.consider_all_requests_local = false

When I start my web server locally using the production environment, the user-friendly error pages display properly.

Has anyone else experienced this?


回答1:


I found a fix for this thanks to Scott at EngineYard

I put this at the beginning of my config/environments/production.rb

class ActionDispatch::Request
 def local?
   false
 end
end


来源:https://stackoverflow.com/questions/4598983/user-friendly-error-pages-not-displaying-in-production-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!