After deploying my app to heroku i get application error. But i do not get stack trace and any other information in browser. Yeah i know i can use heroky -logs but they don't give me information at all.All Ready try to set up ENV=Development. Want to my error pages on heroku will looks like

- 31
- 1
- 7
4 Answers
You can catch errors manually and show they at view
Errors catching in Ruby is perfomes via begin
, rescue
, else
, ensure
and end
And you are need not catch errors in each method of each controller - you just can add common handler for unhandled exceptions, look here how

- 1
- 1

- 2,421
- 4
- 23
- 49
On heroku your app runs in production mode. I beleive, the answer for this question should help: Rails - error in production mode

- 1
- 1

- 24
- 5
To see development like errors on Heroku you have to run the app in development mode. Heroku sets two config variables RACK_ENV
and RAILS_ENV
to production
by default when you deploy your app to heroku, you can see this in config vars under heroku app settings.
To run your app in development mode set RACK_ENV
and RAILS_ENV
to development
.
You can do this through heroku toolbelt:
heroku config:set RACK_ENV=development --app app-name
heroku config:set RAILS_ENV=development --app app-name
Not to mention but you should set this back to production
before giving it to your real users.

- 1,848
- 21
- 41