Not getting debug output for view errors in develo

2019-04-24 17:19发布

问题:

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.