I'm trying to run heroku rake db:migrate
, and I get the following error:
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
I've followed the instructions in this post, namely to:
- add 'pg' to Gemfile, under :production
- run bundle install --without production
But I still get the error.
Here's my Gemfile:
source 'http://rubygems.org'
gem "rails", "~> 3.1.0"
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate', '~> 3.0.2'
gem 'jquery-rails', '>= 1.0.12'
group :assets do
gem 'sass-rails', "~> 3.1.0"
end
group :development do
gem 'rspec-rails', '2.6.1'
gem 'faker', '0.3.1'
gem 'sqlite3', '~> 1.3.4'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'guard-rspec'
gem 'growl_notify'
gem 'factory_girl_rails', '1.0'
gem 'sqlite3', '~> 1.3.4'
end
group :production do
gem 'pg'
end
Someone on #RubyOnRails suggested it was an incorrectly configured database.yml for production, but to quote the Heroku site itself, "To ease deployment of typical Rails applications, Heroku automatically generates a new database.yml file on deployment."
I'm stumped. Any ideas?