Alex Rivera | Logout

Heroku error when launch rails3.1 app missing postgres gem

Asked 2011-06-20T11:45:49.843
14

I am trying to deploy to heroku.

Rails 3.1.0.rc4,

I get the following error from Heroku logs:

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)

I tried to install the activerecord-postgresql-adapter but then I get this error:

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

So I tried to add this to my gem file

gem 'pg'

which produced this 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)

any ideas?

Edit
Report

1 Answer

6

I found a solution in this Heroku article.

As Jared said, they suggest to create a different group for postgresql.

answered 2011-10-31T20:51:33.640

Your Answer