Mac OS Yosemite PostgreSQL



我刚刚更新到Yosemite,我的postgres版本无法工作,我收到了来自rails的以下消息:

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

即使我已经用启动了几次服务器

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

我正在尝试将postgreSQL与自制程序解除链接并重新安装,但我不知道它是否可行。

只需要取消postgreSQL 的链接

brew unlink postgresql

然后

xcode-select --install

最后是

brew install postgresql
brew install openssl

但是rails服务器并没有工作,所以:

rvm get stable

查看哪个是我当前的子

rvm list
sudo rvm uninstall <current_ruby>
rvm install <current_ruby>

现在创建初始化postgredb

initdb /usr/local/var/postgres9.3.5

并启动您的服务器

pg_ctl -D /usr/local/var/postgres9.3.5 -l logfile start

你完了。

最新更新