How to Handle Ruby on Rails Error: "Please Install the Postgresql Adapter: 'Gem Install Activerecord-Postgresql-Adapter'"

Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`

make sure your db-adapter in database.yml is set to "postgresql". If still you have the same problem, then try using the pure-ruby adapter:


gem install postgres-pr

(make sure you uninstall the pg gem before... to avoid conflicts)

If it works, then it's a problem with the postgres gem. Anyway, for development purposes, using the pure-ruby gem is usually ok.

Please install the postgres adapter: `gem install activerecord-postgres-adapter`

In your database.yml file should be.

adapter: postgresql

Also, in GemFile must have: gem 'pg'

Ruby on Rails postgres adapter error when trying to run the server

My problem was that I didn't actually know where to edit the gemfile (looked at the wrong gem file originally)

adding "gem 'pg'" to the Gemfile fixed it.
Thanks to 'mu is too short'

Activerecord-PostgreSQL Adapter Error

The problem seems to be related to the fact that I used the prepackaged install from PostgreSQL. I reinstalled postgresql using macports and it worked great.

Good instructions in this blog:

http://eddorre.com/posts/installing-ruby-on-rails-postgresql-mysql-on-snow-leopard

Heroku error: Please install the postgresql adapter but I'm using mysql, so why am I seeing this error?

I don't want to presume anything but if you were able to work with heroku before, you probably had something like this in your Gemfile:

group :production do
gem 'pg'
....
end

group :development do
gem 'rspec-rails'
gem 'sqlite3'

....
end

This would ensure that rails is using mysql (or sqlite3 if you copy the example verbatim) in the development environment and postgres ('pg') on the production environment hosted by heroku. Give this a shot and see if it solves your problem. I hope it does.

capistrano error msg: Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file --

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.



Related Topics



Leave a reply



Submit