Heroku error al iniciar la aplicación rails3.1 falta gema de postgres

Estoy tratando de implementarlo en heroku.

Rails 3.1.0.rc4,

Recibo el siguiente error de los registros de Heroku:

Starting process with command: `thin -p 48902 -e production -R /home/heroku_rack/heroku.ru start`
2011-06-20T11:25:44+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.0.rc4/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.) (RuntimeError)

Intenté instalar el activerecord-postgresql-adapter pero luego aparece este error:

Could not find gem 'activerecord-postgresql-adapter (>= 0)' in any of the gem sources listed in your Gemfile.

Así que intenté agregar esto a mi archivo de gemas

gem 'pg'

que produjo este error:

Installing pg (0.11.0) with native extensions /Users/imac/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

¿algunas ideas

Respuestas a la pregunta(3)

Su respuesta a la pregunta