我正在通过Heroku跟踪Ruby入门。我正处于声明应用程序依赖关系(https://devcenter.heroku.com/articles/getting-started-with-ruby#declare-app-dependencies)的步骤,我坚持在本地安装Postgres。
我使用zsh作为我的shell,所以我认为存在问题$PATH
。我已成功下载Postgres并将其拖到我的Applications文件夹中。
这是我被困在
的地方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
,然后将其添加到#User configuration
部分。
但是,当我使用which psql
命令检查它是否正常工作时,它会返回psql not found.
答案 0 :(得分:0)
也许您重新启动了zsh终端。
因为zsh终端启动时会加载~/.zshrc
。
如果您想反映~/.zshrc
配置,您有两种方法。(例如:adding export PATH=...
)
重新启动zsh终端。关闭(Ctrl + w)并启动终端应用程序。
使用source
命令加载配置文件,如下所示。
$ source ~/.zshrc