I'm running ruby 1.8.7 on rvm, and I'm trying to install the pg gem. I've used macports to install postgresql 8.3. I'm running on a dual-core mac. I try installing the pg gem with this command: (all directories are not empty)
env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pgsql-lib=/opt/local/lib/postgresql83 --with-pgsql-include=/opt/local/include/postgresql83/ (I've also tried w/the i386 flag)
Here's the response:
checking for pg_config... yes MacOS X build: fixing architecture flags: using the value in ARCHFLAGS environment variable ("-arch x86_64"). checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for PQconnectdb() in -lpq... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no Can't find the PostgreSQL client library (libpq) *** 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.
Any suggestions?