capistrano错误消息:请安装pg适配器:`gem install activerecord-pg-adapter`(无法加载此类文件 –

我正在使用capistrano并收到此错误消息:

Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file -- active_record/connection_adapters/pg_adapter) 

我从我的Gemfile中删除了gem’pg’并bundle install d。 我在Gemfile.lock中没有看到pg gem。 我还将生产数据库更改为sqlite3适配器。 为什么Rails 3.2 / Capistrano / Bundler要求这个? 我没有使用它而不是Gemfile.lock,我该如何解决? 我正在服务器上使用ubuntu 12.04。

提前thx

此外,当我运行它告诉我运行的东西时,我得到:

 deploy@oahu:~$ gem install activerecord-pg-adapter ERROR: Could not find a valid gem 'activerecord-pg-adapter' (>= 0) in any repository ^CERROR: Interrupted deploy@oahu:~$ \ 

**编辑1 **

来自app的根目录

 Fri Mar 22$ grep -ri 'pg-adapter' * Fri Mar 22$ 

database.yml的

 development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 

这是github上的database.yml文件的屏幕截图:

在此处输入图像描述

检查你的database.yml 。 你可能有一个名为pg-adapter的条目,当Postgres的正确适配器是postgresql 。 如果您删除或替换它,这应该工作。