Rails 4 postgres bug – 无法创建数据库,因为pg gem“缺失”,但事实并非如此

我使用rails edge(4.0)并在执行时:

bundle exec rake db:create 

我明白了

 Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile. 

我的Gemfile中有“gem pg”,我已经运行了bundle install …

这可能是什么原因?

谢谢

问题是我使用的是旧版本的pg gem(0.9.0),新版本按预期工作!

对我来说,没有用户/通行证,并在config/database.yml上使用host设置

 defatul: &default adapter: postgresql encoding: utf-8 host: localhost pool: 5 development: <<: *default database: appname_development test: <<: *default database: appname_test