title: Rails rake assets:precompile for production
body: <p>I'm trying to precompile the assets for my app to deploy to Heroku but have to following error.</p>
  
  <p>When running:</p>
  
  <pre><code>RAILS_ENV=production bundle exec rake assets:precompile
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>/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.)
  </code></pre>
  
  <p>Because I use in development SQLite and in production Postgresql the following Gemfile</p>
  
  <pre><code>gem "rails", "~&gt; 3.1.0"
  
  group :production do
    gem 'pg'
  end
  
  group :development, :test do
    gem 'sqlite3'
  end
  
  gem 'sass-rails', "~&gt; 3.1.0"
  
  group :assets do
    gem 'coffee-rails', "~&gt; 3.1.0"
    gem 'uglifier'
    gem 'compass', '~&gt; 0.12.alpha.0'
    gem 'html5-boilerplate'
  end
  </code></pre>
  
  <p>I tried a lot but can't get this working.</p>
  
  <p>I don't know if this is important but my database.yml looks like:</p>
  
  <pre><code>production:
    adapter: postgresql
    host: localhost
    database: db
    encoding: unicode
    username: user
    password: ''
  </code></pre>