OS X rails3 postgresql cannot create database not recognizing its default username

人盡茶涼 提交于 2020-01-16 19:36:26

问题


On a machine running OS X 10.6 a rails 3.2 environment is attempting to create the databases, but failing.

Rake gems tested: include 0.9.2.2 (installed by some dependency) and a declared 10.0.4. username is defined in database.yml

Couldn't create database for {"adapter"=>"postgresql", "database"=>"app_development", "username"=>"postgres"}

FATAL: role "postgres" does not exist

Yet, this is not the first application on the machine. All other applications connect to the postgre cluster with that username. How can this instance not recognize the role and in the others, yes?


回答1:


Just a guess: you installed PG with homebrew, right? If so, the admin user is your own username (type whoami in a terminal), rather than postgres.



来源:https://stackoverflow.com/questions/16961927/os-x-rails3-postgresql-cannot-create-database-not-recognizing-its-default-userna

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