【发布时间】:2015-02-09 13:53:45
【问题描述】:
当我尝试使用 User.connection 或 generic-table.connection 连接到我的 pg 数据库时,我收到此错误
PG::ConnectionBad: FATAL: 用户“用户名”的对等身份验证失败
我仔细检查了我的 database.yml,它看起来不错。我认为问题出在我的 pg_bha.conf 文件上?我现在在我的应用程序或系统中找不到此文件。
数据库.yml
development:
adapter: postgresql
encoding: utf8
database: project_development
pool: 5
username:
password:
test: &TEST
adapter: postgresql
encoding: utf8
database: project_test
pool: 5
username: name
password:
production:
adapter: postgresql
encoding: utf8
database: project_production
pool: 5
username: name
password:
cucumber:
<<: *TEST
Thanks for the help.
【问题讨论】:
-
你能贴出你的database.yml代码吗