Postgres rails doesn't recognize user

China☆狼群 提交于 2019-12-11 12:57:59

问题


So my rails app gives me the "We're sorry, but something went wrong." When I check the logs, I see

PG::Error (FATAL:  role "ubuntu" does not exist
):

However, when I then do this (note I believe that I never added a password to role ubuntu):

sudo -u postgres createuser ubuntu
Shall the new role be a superuser? (y/n) y
createuser: creation of new role failed: ERROR:  role "ubuntu" already exists

I'm running this on an ubuntu ec2 instance with nginx server.

EDIT: I just tried uninstalling and reinstalling postgres, and completely broke it, so I won't be able to accept any answer here.

来源:https://stackoverflow.com/questions/19342553/postgres-rails-doesnt-recognize-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!