Why does “heroku console” with Padrino give useless error messages?
Pergunta
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?
Solução
This has been fixed in the latest version of the Heroku gem. Running heroku update
should resolve this issue.
Outras dicas
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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow