Thursday, 31 January 2008

Install Ruby Gem Postgres In Ubuntu Linux

Installing ruby gem postgres in Ubuntu linux
sudo gem install postgres
gives the next error
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
  ERROR: Failed to build gem native extension.

ruby extconf.rb ins postgres
extconf.rb:46: command not found: pg_config --includedir
extconf.rb:53: command not found: pg_config --libdir
checking for main() in -lpq... no

Can be solved by:

sudo apt-get install libpq-dev
sudo gem install postgres-pr

8 comments:

  1. Nice bro, rails rules, greetings from Mexico.

    ReplyDelete
  2. It worked for me too! Thanks a lot!

    ReplyDelete
  3. Yeah! Worked for me! There was a similar error before this one that I resolved by installing ruby1.8-dev.

    Thanks!

    ReplyDelete
  4. U re the best man. from great britain

    ReplyDelete
  5. It worked on Lucid. Thank you!

    ReplyDelete