1

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 https://i.stack.imgur.com/aPcIE.png

user1515777
  • 31
  • 1
  • 7

4 Answers4

1

try this, you can keep track

heroku logs -t
Sanju B Myh
  • 271
  • 1
  • 15
0

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

Community
  • 1
  • 1
General Failure
  • 2,421
  • 4
  • 23
  • 49
0

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

Community
  • 1
  • 1
0

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.

abhishek77in
  • 1,848
  • 21
  • 41