I'm trying to precompile the assets for my app to deploy to Heroku but have to following error.
When running:
RAILS_ENV=production bundle exec rake assets:precompile
Error:
/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
Because I use in development SQLite and in production Postgresql the following Gemfile
gem "rails", "~> 3.1.0"
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end
gem 'sass-rails', "~> 3.1.0"
group :assets do
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
gem 'compass', '~> 0.12.alpha.0'
gem 'html5-boilerplate'
end
I tried a lot but can't get this working.
I don't know if this is important but my database.yml looks like:
production:
adapter: postgresql
host: localhost
database: db
encoding: unicode
username: user
password: ''