1

When using heroku console, I always get "Internal server error" when an exception is raised rather than a stacktrace as I would expect.

Here's a transcript of what I mean:

$ heroku console
Ruby console for myapp.heroku.com
>> var_that_does_not_exist
 !   Internal server error
>>
$ heroku run bundle exec padrino console -e production
Running bundle exec padrino console -e production attached to terminal... up, run.9
=> Loading production console (Padrino v.0.10.1)
=> Loading Application MyApp
=> Loading Application Admin
irb(main):001:0> var_that_does_not_exist
NameError: undefined local variable or method `var_that_does_not_exist' for main:Object
        from (irb):1
irb(main):002:0> 

Any ideas on what I can change to get the stack traces?

Benjamin Oakes
  • 12,262
  • 12
  • 65
  • 83
  • Thats a good question, I tend to use the "heroku run bundle exec..." approach when I am running my Padrino apps on cedar stack. I'll check back here but if you figure it out maybe we can add it into one of the Padrino guides... – Nathan Sep 07 '11 at 18:18
  • The "heroku run" solution seems to work just fine on the Bamboo stack also. It seems that there should be a setting for whatever "heroku console" does that we can just change... The solution will have to go in the guides, when we get it. :) – Benjamin Oakes Sep 07 '11 at 18:44

2 Answers2

1

This has been fixed in the latest version of the Heroku gem. Running heroku update should resolve this issue.

wuputah
  • 11,285
  • 1
  • 43
  • 60
0

heroku console has been deprecated. You should use heroku run … instead. Depending on your rails version, one of the following should work:

$ heroku run script/console $ heroku run bundle exec rails console

Sethupathi
  • 930
  • 9
  • 9
  • 1
    Or for Padrino (what we're using for the app in question): `heroku run padrino console`. That's definitely the way to go now, but at the time it was a Heroku bug (see accepted answer). – Benjamin Oakes Nov 29 '12 at 17:21