我安裝小牛後,我的postgres配置似乎完全搞砸了。我安裝了開發工具,用於從小牛Xcode和我試圖把主機:本地主機的分貝YML但仍,如果我嘗試運行軌道S:Postgres配置搞糟OSX小牛隊後
could not connect to server: No such file or directory (PGError)
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
如果我嘗試用手動啓動Postgres的:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
我得到:server starting
但pg_ctl -D /usr/local/var/postgres status
回報pg_ctl: no server running
?
我試圖重新安裝pg gem並重新加載postgresql,但無濟於事。 brew info postgres
回報:
postgresql: stable 9.3.1
http://www.postgresql.org/
Conflicts with: postgres-xc
/usr/local/Cellar/postgresql/9.3.1 (2919 files, 39M) *
因爲我沒釀重新安裝postgress我知道得到這個:
The data directory was initialized by PostgreSQL version 9.2,
which is not compatible with this version 9.3.1.
我有一個Postgres的查詢工具,它似乎並不具有連接,所以我知道的數據是什麼麻煩還在那兒。
我真的很感激,如果有人能幫我弄明白這一點,謝謝。
當嘗試連接到本地主機時(通過'database.yml'中的主機項),提示Unix域套接字的錯誤不會發生,這意味着您對此文件的更改將被忽略。你應該試着在別的之前解決這個問題。特別是如果您的查詢工具仍然可以連接,因爲這意味着postgres實際上正在運行。 –