Search code examples
deploymentherokurake-task

Cannot run heroku pg:info from rake task


I am writing a rake task to deploy on heroku. The task has only one step:

sh %{ heroku pg:info --app myapp}

and it fails with

heroku pg:info Unknown command. Run 'heroku help' for usage information. rake aborted! Command failed with status (1): [heroku pg:info --app...]

The funny thing is that any other heroku command seems to work. It is just the "heroku pg" ones that do not work.

Ideas?

Thanks in advance for any help


Solution

  • The problem was due to rack using heroku gem version 1.6.3 which does not support the pg commands. After I have updated my Gemfile to update heroku to 1.18.3 everything started to work.