2

I am using capistrano and get this error message:

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

I have removed the gem 'pg' from my Gemfile and bundle installd . I don't see the pg gem in my Gemfile.lock. I have also changed my production db to a sqlite3 adapter. Why is Rails 3.2 / Capistrano / Bundler asking for this? I'm not using it and not in Gemfile.lock and how do I resolve it? I am using ubuntu 12.04 on server that this is happening on.

thx in advance

Also, when I run what it tells me to run, I get:

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:~$ \

** edit 1 **

from root of 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

here's a screenshot of the database.yml file on github:

enter image description here

timpone
  • 19,235
  • 36
  • 121
  • 211

1 Answers1

10

Check your database.yml. You probably have an entry in it called pg-adapter, when the correct adapter for Postgres is postgresql. If you remove or replace that, this should work.

Veraticus
  • 15,944
  • 3
  • 41
  • 45
  • thx, I have added my database.yml and done the results of a grep through the directory tree. I'm pretty baffled. Any other thoughts? thx again - I know prob something stupid on my part – timpone Mar 23 '13 at 02:20
  • You say this happens during a deploy -- is a different `database.yml` copied to your config directory during the deploy process? – Veraticus Mar 23 '13 at 02:23
  • hmm... I don't think so. Using capistrano; I don't know how a different database.yml could get there. Checked on github and no reference to pg in database.yml. I suspect you're right but I'm thinking how this could be. Capistrano deletes the release; let me see if I can get it to not delete release – timpone Mar 23 '13 at 02:29
  • just added a screenshot of the database.yml on github - see no reference to postgres – timpone Mar 23 '13 at 02:33