Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails full error page not showing for view errors

I have a view named new.html.erb with the following code:

<%= some_non_existent_thing.imaginary_method %>

Now, I only see one simple 500 error page, like that:

500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.

Shouldn't I see a pretty formatted page with some information about the exception?

I'm not sure I miss something here, but I believe rails used to show the full error page in development environment when there is something wrong in the view.

like image 401
felipero Avatar asked May 04 '12 00:05

felipero


1 Answers

Are you sure that you are running the development environment? Check that RAILS_ENV=development or that you are running rails server -e development.

Then check your development.rb file, you should have the following line in it

config.consider_all_requests_local = true
like image 99
Anton Roslov Avatar answered Nov 06 '22 01:11

Anton Roslov