From: Saeed Bhuta Date: 2010-02-26T23:16:36+09:00 Subject: Installing Pg gem for PostGreSQL 8.4 Hi All, I want to save data from a ruby script into a table in a PostGreSQL 8.4 database. After looking into PostGreSQL connectivity in Ruby, I have come accross the 'pg' gem. I attempted to install the gem with the command: 'sudo gem install pg' but got the following error: sudo gem install pg Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for main() in -lpq... no checking for main() in -llibpq... no checking for main() in -lms/libpq... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.8 --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Could not find PostgreSQL build environment (libraries & headers): Makefile not created Gem files will remain installed in /var/lib/gems/1.8/gems/pg-0.8.0 for inspection. Results logged to /var/lib/gems/1.8/gems/pg-0.8.0/ext/gem_make.out Would appreciate it if someone could point me in the right direction. Saeed. -- Posted via http://www.ruby-forum.com/.