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
How to Extract Url Parameters from a Url With Ruby or Rails
What's Different Between Each and Collect Method in Ruby
Group Hashes by Keys and Sum the Values
When to Use 'Self.Foo' Instead of 'Foo' in Ruby Methods
Actioncontroller::Unknownformat
Why Are Gems Installed in a Directory With a Different Ruby Version Than I'M Running
Creating Matrix With 'Array.New(N, Array.New)'
What Does the "Map" Method Do in Ruby
Sort Hash by Key, Return Hash in Ruby
What's the Best Way to Use Soap With Ruby
Accepts_Nested_Attributes_For With Belongs_To Polymorphic
Saving Enum from Select in Rails 4.1
Using Helpers in Model: How to Include Helper Dependencies
How to Search File Text For a Pattern and Replace It With a Given Value