Alex Rivera | Logout

How to enable error reporting when running a rails app in production mode?

Asked 2012-07-25T12:22:10.830
8

I am working in a rails app. I can able to see the below screen in my production server whenever there is an error. (Text : We're sorry, but something went wrong.)

How do i enable error reporting in my server to see the actual error? Do i have to do any config change in Rails app or enable error reporting in my server.

enter image description here

Note : My server is Ngnix.

Edit
Report

1 Answer

15

If you add this to your config/environments/production.rb:

config.consider_all_requests_local = true

You will see the same errors as in development, but it will also disable the caching for the production app etc.

I would rather suggest you look into /log/production.log . The same errors are posted there as are normally shown on screen.

answered 2012-07-25T12:25:17.693

Your Answer