From: Thomas Yager-Madden Date: 2003-08-29T12:57:10+09:00 Subject: Re: Mac OS X and ruby-postgres again Earlier, I wrote: > I'm trying to build ruby-postgres extension under Mac OS X 10.2.6, ruby > 1.6.7, PostgreSQL 7.3.3. Running extconf.rb returns the familiar error > > checking for PQsetdbLogin() in -lpq... no > Could not find PostgreSQL libraries: Makefile not created Now, thanks once again to everybody for the friendly, thoughtful and helpful replies. I realize not everybody shares this problem, and much appreciate the willingness to pitch in, especially given my newbishness. I'm happy to report, *mystery finally solved!* :) In desparation I tried rebuilding both PostgreSQL and Ruby itself from latest sources, only to have ruby-postgres extension fail again with the same error noted above. The answer turned out to be that I had to update the compiler link table by running ranlib of libpq.a sudo ranlib /usr/local/pgsql/lib/libpq.a (This was suggested by a mailing list archive in which someone had run into a similar problem trying to build the 'psycopg' python interface for postgresql.. http://lists.initd.org/pipermail/psycopg/2002-September/001344.html) I tried this, and it worked like a charm. OS X, PostgreSQL, and Ruby now all get along great on my home box! I am very thrilled. Although I found the solution elsewhere, I don't think I would have kept at it as long as I did, without the support from here, so thanks again. Also, looking at the Google archive shows that this question has come up in comp.lang.ruby at least twice before, and appears to have gone unanswered. So, I'm not sure this comes up so often as to be FAQ-worthy, but I bet it will come up again from somewhere, and 'ranlib libpq.a' will be a useful bit of information to have tucked away somewhere. Cheers, Thomas