I installed postgresql9.1 into my Centos 6.4. I can do psql template
(as root
) to open the database console but cannot use Rails rake db:create
to create the database:
FATAL: Ident authentication failed for user "root"
My configuration is as follow:
{
"adapter"=>"postgresql",
"host"=>"localhost",
"encoding"=>"unicode",
"username"=>"root",
"pool"=>5,
"database"=>"xxx_prod"
}
I guess Rails is unable to locate the sock file (.s.PGSQL.5432). So I would like to specify it explicitly but I don't know where the sock file is located. Where should it be? How can I locate it?