Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku pg:pull is giving sh: createdb: command not found

When I try to do heroku pg:pull DATABASE_URL myappspassword, I get this error:

my-computer:a-folder (master*) · heroku pg:pull DATABASE_URL myappspassword
 !    sh: createdb: command not found
 !    
 !    Unable to create new local database. Ensure your local Postgres is working and try again.

For once Googling doesn't return a result. I'm wondering if it's related to the fact that when I do which psql, there is no result. Maybe I need to do something special with pgAdmin to get this working (e.g. export command line tools)?

like image 473
Don P Avatar asked Jun 19 '14 19:06

Don P


1 Answers

Are you on a Mac, by chance, and using Postgres App?

If so, the problem might be that createdb isn't on your path. Try adding it by inserting the following into ~/.bash_profile.

export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin

Then run source ~/.bash_profile and try again.

There's more info on the Postgres App site: http://postgresapp.com/documentation/cli-tools.html

like image 144
dB' Avatar answered Oct 21 '22 20:10

dB'