Not getting debug output for view errors in development mode

你离开我真会死。 提交于 2019-12-07 02:33:50

问题


This is very odd. At the moment, I have some kind of error in a view, but can't see what it is. Also, no debug output in the web server trace.

The Rails 3.2.2 app is an upgrade from 2.7.10, and I'm using "thin" as my development server. I do get normal debug output when the error occurs in other places.

EDIT: I'm running development, as you can see here:

=> Booting Thin
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

EDIT: I can duplicate this behavior by raising an exception in the controller.


回答1:


Please check you development.rb and ensure that

config.consider_all_requests_local = true

Otherwise exceptions and stack traces will not be shown.




回答2:


I would compare the files in your ./config directory of your app with those of a clean Rails 3.2 install. They've restructured things pretty significantly and there are often strange errors like this that popup if you don't properly upgrade all the config files.



来源:https://stackoverflow.com/questions/9645446/not-getting-debug-output-for-view-errors-in-development-mode

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