2014-08-29 71 views
0

我有一個rails項目,可以與postgresql和pg一起使用。 我在我的電腦安裝的Postgres,但是當我嘗試創建/遷移aplication的分貝,我收到以下錯誤:創建數據庫時發生連接錯誤

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

我已經創建應用程序的用戶。 我至少沒有postgresql文件夾,我不得不創建它。 可能是什麼問題?

我使用Ubuntu 14.04

+0

這聽起來像你沒有運行PostgreSQL。你開始使用Postgres服務器嗎? – infused 2014-08-30 03:51:50

+0

是的,我做到了。我認爲這是一個套接字問題 – ivo 2014-08-30 15:26:27

回答

0

默認情況下套接字連接文件位於/ tmp文件夾,你可以在/tmp/.s.PGSQL.5432找到它。要更改位置檢查〜/ .parts/var/postgresql/postgresql.conf文件,但/ var/run目錄現在不可寫入,則不能選擇/ var/run作爲套接字文件位置。

相關問題