Thursday, February 17, 2011

Rails 3 development environment and 404 errors

By default, Rails shows a Routing Error when you go to improper route:

Routing Error

No route matches "/badroute"


If you want to test your error page, the solution is (in your config/environments/development.rb file):

config.consider_all_requests_local       = false