我刚刚在运行Ubuntu的Godaddy VPS上创建了一个新的RoR项目。该应用程序设置为运行已安装并正在运行的Postgres。Postgres Rails DB Bug
w当我做了初始前,我得到:
server$ bin/rake db:create db:migrate
FATAL: role "root" does not exist
Run `$ bin/rake db:create db:migrate` to create your database
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:898:in `rescue in connect'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-4.1.5/lib/active_record/........
这里是我的数据库阳明
development:
adapter: postgresql
encoding: utf8
database: project_development
pool: 5
username: philip
password: ###
test: &TEST
adapter: postgresql
encoding: utf8
database: project_test
pool: 5
username: philip
password: ### - not real
production:
adapter: postgresql
encoding: utf8
database: project_production
pool: 5
username: philip
password: ###
我试图root
和philip
。
我已经在PG中创建了角色和用户。
不管我的database.yml的,耙抱怨根 – Tithos 2014-08-30 17:40:36
我想有另一个文件 – Tithos 2014-08-30 17:40:54