Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test 500.html in rails development env?

I want to test the 500 error pages in my Rails app using the development environment.

I already tried this in config/environments/development.rb:

config.action_controller.consider_all_requests_local = false 

But this does not seem to have any effect.

like image 207
tbk Avatar asked Nov 11 '10 16:11

tbk


2 Answers

The only way I've found to do this so far is to set in development.rb

config.consider_all_requests_local = false

Now, restart the server.

Then access the URLs using my local IP address: http://192.168.1.135:3000/blah

The other settings mentioned don't seem to have any effect.

like image 65
u2622 Avatar answered Oct 17 '22 13:10

u2622


None of the proposed solutions worked in my Rails 3 app. The quick and dirty solution for me was to simply hit the error pages directly to see the rendered HTML. For example,

http://0.0.0.0:3000/404.html  http://0.0.0.0:3000/500.html 
like image 34
Jeff Poulton Avatar answered Oct 17 '22 14:10

Jeff Poulton