Ruby-Postgres problems


I’m having problems running the Ruby-Postgres extension, and am looking for
any suggestions anyone may have:

After some initial trouble getting extconf.rb to find libpq, I suceeded
creating the Makefile:

iusris@codedbliss[~/src/ruby-postgres-0.6.5] ruby extconf.rb
checking for cygwin32_socket() in -lwsock32… no
checking for socket() in -lsocket… no
checking for gethostbyname() in -linet… no
checking for gethostbyname() in -lnsl… yes
checking for sys/un.h… yes
checking for socket()… yes
checking for hsterror()… no
checking for gethostname()… yes
checking for PQsetdbLogin() in -lpq… yes
checking for PQsetClientEncoding()… yes
checking for pg_encoding_to_char()… no
creating Makefile

The rest of the process seems to work as well:
iusris@codedbliss[~/src/ruby-postgres-0.6.5] make
gcc -shared -L/usr/lib/ruby/1.6/i686-linux-gnu -L/usr/lib -o
-lpq -lnsl -lc

root@codedbliss[/home/iusris/src/ruby-postgres-0.6.5] make install -> /usr/lib/ruby/1.6/i686-linux-gnu/
chmod 0555 /usr/lib/ruby/1.6/i686-linux-gnu/

Then I noticed that there was very little to celebrate:

irb(main):001:0> require 'postgres’
LoadError: (null) - /usr/lib/ruby/1.6/i686-linux-gnu/
from (irb):1:in `require’
from (irb):1

Checking ldd, I think everything is linking how it should be (according to

root@codedbliss[/usr/local/pgsql/lib] ldd
/usr/lib/ruby/1.6/i686-linux-gnu/ => /usr/local/pgsql/lib/ (0x40013000) => /lib/ (0x40023000) => /lib/ (0x40039000) => /lib/ (0x4015e000) => /lib/ (0x4018b000)
/lib/ => /lib/ (0x80000000)

… so what’s the LoadError caused by?

#My Configuration

  • Postgresql-7.2.2
  • Ruby 1.6.7 (2002-03-01) [i686-linux-gnu]
  • Gentoo Linux

Many thanks to anyone, in advance, that can help me try to resolve this

  • B

Bruce Williams
Vision without action is a daydream.
Action without vision is a nightmare.
– japanese proverb