Rails: could not connect to database postgres: FATAL: Peer authentication failed for user "username"

/var/lib/pgsql/9.2/data/pg_hba.conf

 打开之后找到

local   all             postgres/all                                peer

 改成

local   all             postgres                                trust

 保存之后重新加载文件

sudo /etc/init.d/postgresql reload

 

posted on 2013-09-14 21:56  小浪鼓  阅读(1467)  评论(0编辑  收藏  举报

导航