Getting error with heroku rails, Could not find psql database client. Check your $ PATH and try again.

Attempting to perform a database operation that requires me to do rails db

I do heroku run rails db

but i get

Running

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

I did:

gem update heroku

      

but it did not help. The same errors still occur.

also:

$ 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.

      

+3


source to share


1 answer


These works:



heroku pg:psql --app # From the app 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.

      

+5


source







All Articles