2013-04-24 43 views
0

我剛換我的應用程序從sqlite3的到PostgreSQL,當我嘗試在http://localhost:3000/或運行耙分貝加載頁面:遷移,我得到:交換數據庫問題

could not connect to server: Connection refused (0x0000274D/10061) 
    Is the server running on host "localhost" (::1) and accepting 
    TCP/IP connections on port 5432? 
could not connect to server: Connection refused (0x0000274D/10061) 
    Is the server running on host "localhost" (127.0.0.1) and accepting 
    TCP/IP connections on port 5432? 

數據庫YAML:

development: 
    adapter: postgresql 
    database: store_delevopment 
    pool: 5 

(現在,我使用默認的Rails服務器statring服務器在開發模式。)

回答

1

更改這些條目的方法來「信任」在你的PostgreSQL data/pg_hba.conf文件:

# IPv4 local connections: 
host all    all    127.0.0.1/32   trust 
# IPv6 local connections: 
host all    all    ::1/128     trust 
+0

我沒有這樣的文件...這個文件夾是空的。同時安裝時出現了一些非致命錯誤 – 2013-04-24 20:47:26

+0

您使用的是哪個版本的PostgreSQL? – 2013-04-24 21:07:02

+0

這是最新的一個,但現在我設置了9.0,安裝了,它運行得非常好,服務器5433已啓動,但仍然無法創建數據庫 – 2013-04-24 21:36:02