使用heroku rails获取错误,找不到数据库客户端psql。检查$ PATH,然后重试

时间:2013-01-22 17:12:21

标签: ruby-on-rails ruby heroku

尝试执行需要我执行rails db

的数据库操作

我正在做heroku run rails db但我正在

Running rails db attached to terminal... up, run.7334 Couldn't find database client: psql. Check your $PATH and try again.

我做了:

gem update heroku

但它没有帮助。仍然得到同样的错误。

此外:

$ heroku run bundle exec rails db --account work --app dmplanning
Running `bundle exec rails db` attached to terminal... up, run.1572
Couldn't find database client: psql. Check your $PATH and try again.

1 个答案:

答案 0 :(得分:5)

这些工作:

heroku pg:psql --app # From the app's root directory
heroku pg:psql --app your_app_name # specifying the app
heroku pg:psql --app your_app_name --account work 
                   # if you have multiple accounts, specify which one.