Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Mac OS优胜美地PostgreSQL_Macos_Postgresql_Ruby On Rails 4_Osx Yosemite - Fatal编程技术网

Macos Mac OS优胜美地PostgreSQL

Macos Mac OS优胜美地PostgreSQL,macos,postgresql,ruby-on-rails-4,osx-yosemite,Macos,Postgresql,Ruby On Rails 4,Osx Yosemite,我刚刚更新到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/post

我刚刚更新到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
然后

最后

brew install postgresql

brew install openssl
但rails服务器无法正常工作,因此:

rvm get stable
看看哪一个是我现在的红宝石

rvm list

sudo rvm uninstall <current_ruby>

rvm install <current_ruby>
然后启动服务器

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

完成了。

很有帮助。我也不得不重新创建这个答案中提到的文件夹:你刚刚创造了我的生活!我缺少initdb步骤运行
xcode-select--install
告诉“我xcode-select:错误:命令行工具已经安装,请使用“软件更新”安装更新”
initdb /usr/local/var/postgres9.3.5
pg_ctl -D /usr/local/var/postgres9.3.5 -l logfile start