Page error 404, 500, 422 --> application errors

The default status code templates are served by a Rack exception application. You can override this to be any Rack compatible app, including your applications router:

# config/application.rb
config.exceptions_app = self.routes


# config/routes.rb
%w( 404 422 500 ).each do |code|
  get code, :to => "errors#show", :code => code
end

# config/environments/development.rb
config.consider_all_requests_local       = false

The default allows for you to see debug mode. But you can change it to false, similar to production environment: