当我尝试:
rake db:migrate
我明白了:
rake aborted!
FATAL: Ident authentication failed for user "postgres"
我
时没有问题vagrant@lucid32:/sudo su - postgres
postgres@lucid32:/ psql
postgres# (can list databases)
这是我的pg_hba.conf文件:
# TYPE DATABASE USER CIDR-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
# Vagrant uses 33.33.33.10 like addresses
host all all 33.33.33.0/24 trust
答案 0 :(得分:0)
假设您尝试重新启动PostgreSQL,并且您仍然收到不是整个pg_hba.conf的错误。
某些发行版在表格上方有一条额外的行,将postgres设置为ident。搜索postgres字符串并更正显示的行。