rails 3.2 development mode is not displaying the f

2019-06-19 22:10发布

问题:

I just upgraded to rails 3.2 Everything is working fine except error pages no longer show the normal development debug info. Instead it's showing the standard production error page (white background with red text in the middle:

"We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."

Is there a new setting or something I'm missing for rails 3.2? I've read over the upgrade instructions and do not see it mentioned anywhere. I tried downgrading to 3.1.3 and the error pages work again so this is definitely a rails 3.2 issue. Thanks.

回答1:

Check the config.consider_all_requests_local inside development.rb. It must be set to true in order to show full error reports.



回答2:

Nicolas, I'm faced the same problem and only saw the message We're sorry, but something went wrong. and nothing in logs.

The problem was in UTF-8 characters, so adding encoding declaration to the beginning of the file solved it:

# encoding = utf-8


回答3:

If neither jibiels nor Dmitrys solution helped, try out the solution mentioned here: Rails doesnt log tempalte errors in development mode

(Maybe this also helps you, @Nicolas)