我正在跟踪通过Heroku开始使用Ruby。在声明应用程序依赖项(,https://devcenter.heroku.com/articles/getting-started-with-ruby#declare-app-dependencies)的步骤中,我不得不在本地安装Postgres。
我使用zsh作为我的shell,因此我认为$PATH有一个问题。我已经成功下载了Postgres并将其拖到我的应用程序文件夹中。
这就是我被困的地方
If you are using bash (default shell on OS X), add the following line to ~/.bash_profile:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin我在我的~/.zshrc中通过vi ~/.zshrc实现了这一点,然后输入/PATH,然后在vi ~/.zshrc部分中添加它。
但是,当我使用which psql命令检查它是否正常工作时,它会返回psql not found.
发布于 2015-02-01 10:57:26
也许你重新启动了你的zsh终端。因为~/.zshrc是在zsh终端启动时加载的。
如果您想要反映~/.zshrc配置,有两种方法。(例如:adding export PATH=...)
source命令加载配置文件,如下所示。
$ source ~/..zshrchttps://stackoverflow.com/questions/28261274
复制相似问题