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