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

Mic*_*ant 3 ruby ruby-on-rails heroku

试图做一个需要我做的数据库操作 rails db

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

Runningrails dbattached to terminal... up, run.7334 Couldn't find database client: psql. Check your $PATH and try again.

我已经做好了:

gem update heroku
Run Code Online (Sandbox Code Playgroud)

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

也:

$ 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.
Run Code Online (Sandbox Code Playgroud)

Mic*_*ant 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.
Run Code Online (Sandbox Code Playgroud)