Rails 400 and 500 error page in development mode -


i trying display 500 error page whenever exception occurs. below setting

in development.rb file

                   config.consider_all_requests_local       = false 

and override method local_request in application_controller.rb file

         def local_request?                false           end 

but still not able display 500 page on local machine in case of exception. tried run app on production mode, still getting same result.however can display 500 web page using ip address.plz

are routing them properly? can custom error pages putting in application.rb:

# error handling config.exceptions_app = self.routes 

then in routes.rb file:

## routes exceptions match '/404', to: "static#not_found",       as: "not_found" match '/422', to: "static#rejected",        as: "rejected" match '/500', to: "static#something_wrong", as: "something_wrong" 

assuming have "static" controller (use whatever want). render out templates would.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -