【发布时间】:2015-05-26 05:59:09
【问题描述】:
免责声明:我对编程很陌生,所以请原谅我的无知。
我正在尝试运行我在 Rails 中编写的应用程序,但是当我这样做时,我收到错误“fe_sendauth:未提供密码”。
这是我的database.yml,我感觉里面有东西。
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
database: url-shortener_development
test:
<<: *default
database: url-shortener_test
production:
<<: *default
database: url-shortener_production
username:
password:
【问题讨论】:
-
这意味着您没有提供开发环境的用户名和密码。通过引用help.ubuntu.com/community/PostgreSQL创建一个用户并为postgres设置密码
-
显示你的
pg_hba.conf文件 -
@rick,据我所知,就在这里。其他用户似乎在不同的位置拥有他们的。
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust抱歉格式化。 -
您可能需要在数据库中创建新角色。你能登录到 postgresql shell 吗?
-
@Caffeine Coder 不,我在过去一个小时左右一直在尝试,没有运气。我一定是在某个时候创建了一个登录名,但我完全不记得它。