just a fyi, but i had the same issue hours ago on a fedora box and got it 
working using

gem install postgres -- --with-pgsql-dir=/usr/local/pgsql

(extra -- is correct),then manually making it...

cd /usr/local/lib/ruby/gems/1.8/gems/postgres-0.7.1/
ruby extconf.rb \
--with-pgsql-include-dir=/usr/local/pgsql/include \
--with-pgsql-lib-dir=/usr/local/pgsql/lib

obvious path changes as req., sorry 'bout the breaks
(info found @ 
http://www.nostalgix.org/blog/2005/06/hack-lot-ruby-on-rails-tiger-and.html)

might have been easier using the tarball... :P


On Tuesday 04 July 2006 00:07, ara.t.howard / noaa.gov wrote:
> On Tue, 4 Jul 2006, Joe Van Dyk wrote:
> > For some reason, downloading ruby-postgres-20060406.tar.gz and doing a
> > manual install worked, while installing with the gem did not.
>
> oh yeah.  i remember that i had the same problem - the compilation stage of
> the gem install doesn't correctly configur the include and lib dirs and
> thus is fails (silently).
>
> fyi for people reading this...
>
> -a