我爲我的Rails應用程序使用PostgreSQL。通過的pgAdmin和控制檯的認證PostgreSQL服務器是成功的,但是當我運行Rails應用程序,我得到以下錯誤:PostgreSQL用戶認證錯誤
FATAL: Peer authentication failed for user "postgres"
我database.yml
:
development:
adapter: postgresql
encoding: unicode
database: app_dating
pool: 5
timeout: 5000
username: postgres
password: '123456'
的pg_hba.conf
:
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
我使用Rails 4.0.1和PotgreSQL 9.1。
http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres – Santhosh