InformationPhotography |
Wednesday, February 27. 2008PostgreSQL and Ruby on OS XTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Hi there.
I know you're working on Mac, but I think you installed your PostgreSQL via an installer and then installed the "pg" gem for Ruby. I'm having a problem here: I'm trying to install the same gem, pg-0.7.9.2008.10.05 (The last version). I followed similar instructions, but instead, I get this... PATH=/opt/PostgreSQL/8.3/bin:$PATH gem install pg Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb install pg 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/local/bin/ruby --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 It mentions 3 files missing as you can see, but that's impossible, because I installed PostgreSQL 8.3.4 via a Linux installer. What could be wrong? The version I'm using now, ruby-pg-0.7.9.2008.01.28, can be installed flawlessly and doesn't give me any errors, but i'm worried about the ActiveRecord support my gem doesn't have and the latest version does. Can you help me? I'm working with a company in a project with Rails 2.1 and PostgreSQL 8.3.4. It's urgent!!! Any ideas? Contact me here: neurochild@gmail.com Greetings and thanks in advance. Juan Escajadillo.
Check for a misconfigured or missing pg_config. Try running /opt/PostgreSQL/8.3/bin/pg_config. If that command returns invalid paths (or the command or any shown elements are missing or wrong) the gem will never find the files it needs. If you are using packages, you may need the development versions.
|
QuicksearchLexiyntax @ Twitter
Categories |