Heroku pg:pull给sh:createdb:命令未找到 [英] Heroku pg:pull is giving sh: createdb: command not found

查看:297
本文介绍了Heroku pg:pull给sh:createdb:命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试执行 heroku pg:pull DATABASE_URL myappspassword 时,出现此错误:

  my-computer:a-folder(master *)·heroku pg:pull DATABASE_URL myappspassword 
! sh:createdb:找不到命令

!无法创建新的本地数据库。确保你的本地Postgres正在工作,然后再试一次。

一旦Google搜寻不会返回结果。我想知道是否它与我做 psql 时没有结果有关。也许我需要用pgAdmin来做一些特殊的事情来获得这种工作(例如导出命令行工具)?

Mac,偶然,并使用 Postgres应用程序



如果是这样,问题可能会发生是 createdb 不在你的路径上。尝试通过在〜/ .bash_profile 中插入以下内容来添加它。

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

然后运行 source〜/ .bash_profile 并重试。



Postgres App网站上有更多信息: http://postgresapp.com/documentation/cli-tools.html


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)?

解决方案

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

这篇关于Heroku pg:pull给sh:createdb:命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆