It turns out that Rails 3.1 doesn’t come with a database adapter. So, when deploying to heroku, the app will blow up unless you add the require postgres gem to your gem file:
group :production do
gem “pg”
end
This resolves the heroku error
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection’: Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)