【发布时间】:2014-11-24 19:14:09
【问题描述】:
我在我的 rails 应用程序中安装了 postgres,但我无法创建任何角色。
对于su - postgres 和psql -d template1 -U postgres 我得到psql:FATAL role "postgres" does exist
我也跑了createuser -s -U $USER
我做错了什么? 谢谢!
【问题讨论】:
-
你是如何安装 PostgreSQL 的?您使用的是哪个操作系统?
-
哪个是你的
database.yml? -
default: &default adapter: postgresql encoding: unicode # For details on connection pooling, see rails configuration guide # http://guides.rubyonrails.org/configuring.html#database-pooling pool: 5 development: <<: *default database: pigo_development -
我使用的是 ubuntu 14,并使用 sudo apt-get install postgresql 安装了 postgresql
-
你已经运行
service postgresql initdb了吗?