`gem install activerecord-postgresql-adapter`はproduction用にGemfileを切る

herokuにRails3.2.1アプリをpushしようとすると,

adapter: `gem install activerecord-postgresql-adapter` 
(pg is not part of the bundle. Add it to Gemfile.) (RuntimeError)

が出てうまくいかない.
ここにはいくつもの罠がある.

group :production do
  gem 'pg'
end
group :development, :test do
  gem 'sqlite3'
end

(参考:HerokuでRails 3.1.3 でdeployするまで - リンゴの水やり?(はてな))
このように書きかえて,

$ bundle install --without production

をしてはじめて成功する.