From: Brian Candler Date: 2003-08-01T20:40:03+09:00 Subject: Re: DBI-PG problems On Fri, Aug 01, 2003 at 10:07:17AM +0900, Michael Garriss wrote: > I'm not sure but I don't think you would have made it through the > install process if libpg in not found. Try adding the postgres ruby > package...that has to be it. The DBI package is pure ruby and doesn't depend on any C libraries, so it installs quite happily. But when you actually try to do DBI::connect('dbi:mysql:') # for example *then* it will try to instantiate the ruby-mysql package, which is a wrapper around the mysql C API. If you haven't installed ruby-mysql, then it will fail. Regards, Brian. > > alex fenton wrote: > > > I had problems like this after installing DBD-Pg on Linux & on Cygwin > > when the library files for Postgres itself weren't getting found in > > LD_LIBRARY_PATH. Make sure that the system can find its way to > > /usr/local/postgres/lib (or whatever - it should have files such as > > libpq.so in it). Tweak /etc/ld.so.conf (or the equivalent on OS X - > > sorry, I'm not familiar with how library paths work on that) or > > LD_LIBRARY_PATH, as you need. > > > > HTH > > alex > > > > culley harrelson wrote: > > > >> I am having trouble with DBI-Pg on os X (ruby 1.6.7). I installed it > >> successfully using config --with=dbi,dbd_pg but when I try to > >> establish a connection I get: > >> > >> 704 $ ./test.rb > >> /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:502:in `load_driver': Could > >> not load driver (No such file to load -- postgres) (DBI::InterfaceError) > >> from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:392:in > >> `_get_full_driver' > >> from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:372:in `connect' > >> from ./test.rb:4 > > > > > > > > > > > > >