Rake db:create:all nie widzi aktualnej wersji database.yml

#SOLVED#
Cześć mam taki mały problem, jak w temacie, mianowicie po wydaniu komendy

rake db:create:all

konsola wyświetla takie komunikaty:

/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:928:in `initialize' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:928:in `new' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:928:in `connect' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:228:in `initialize' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:25:in `new' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:25:in `postgresql_connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:228:in `new_connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `checkout_new_connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block (2 levels) in checkout' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `loop' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `block in checkout' /.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `checkout' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:93:in `connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:316:in `retrieve_connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:92:in `rescue in create_database' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:39:in `create_database' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:24:in `block (5 levels) in <top (required)>' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:132:in `local_database?' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:24:in `block (4 levels) in <top (required)>' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:10:in `each_value' /.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:10:in `block (3 levels) in <top (required)>' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:636:in `call' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:631:in `each' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain' /.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /.rvm/gems/ruby-1.9.2-head/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' /.rvm/gems/ruby-1.9.2-head/bin/rake:19:in `load' /.rvm/gems/ruby-1.9.2-head/bin/rake:19:in `<main>' Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"user_production", "pool"=>5, "username"=>"test1", "password"=>nil}
aktualny plik database.yml wygląda tak:

[code]development:
adapter: postgresql
encoding: utf8
database: user_development
pool: 5
username: postgres
password: haslo

test:
adapter: postgresql
encoding: utf8
database: user_test
pool: 5
username: postgres
password: haslo

production:
adapter: postgresql
encoding: utf8
database: user_production
pool: 5
username: postgres
password: haslo[/code]
Polecenie rake db:create:all nie widzi aktualnej wersji pliku database.yml, gdy otworze w edytorze wyświetla się prawidłowa zawartość database.yml.

System operacyjny Ubuntu 10.04.

Może nie masz gemu ‘pg’ w Gemfile?

Albo twój postgres jest w wersji 9.0 gdzie już trzeba mieć gem pg w wersji 0.10.0.

Gem pg obecny w Gemfile, pg w wersji 0.10.0.

Może w czasie pracy zmieniłeś nazwę katalogu aplikacji z konsoli, a edytor tego nie zauważył?

Dzięki, właśnie to było przyczyną. Wieczorem wczoraj w nazwie projektu na końcu dodałem nieświadomie s i stąd te problemy. Ta przyczyna błędu była za prosta :wink: