我剛剛在運行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