当我尝试执行 heroku pg:pull DATABASE_URL myappspassword
时,出现此错误:
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.
这一次谷歌搜索没有返回结果。我想知道这是否与我执行 which psql
时没有结果有关。也许我需要对 pgAdmin 做一些特殊的事情才能让它工作(例如导出命令行工具)?
最佳答案
您是否碰巧在 Mac 上使用 Postgres App ?
如果是这样,问题可能是 createdb
不在您的路径上。尝试通过将以下内容插入 ~/.bash_profile
来添加它。
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
然后运行 source ~/.bash_profile
并重试。
在 Postgres 应用网站上有更多信息:http://postgresapp.com/documentation/cli-tools.html
关于postgresql - Heroku 页面 :pull is giving sh: createdb: command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24315005/