Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Nov 2009 00:17:23 -0800
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        penty.wenngren@dgc.se
Cc:        "ruby@FreeBSD.org" <ruby@FreeBSD.org>
Subject:   Re: Ruby, dbi and PostgreSQL
Message-ID:  <20091115001723.baab8e25.stas@FreeBSD.org>
In-Reply-To: <20091112162430.GP74360@picard.dgc.se>
References:  <20091111160649.GL74360@picard.dgc.se> <20091111100826.e0dcfdca.stas@FreeBSD.org> <20091112162430.GP74360@picard.dgc.se>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Sun__15_Nov_2009_00_17_23_-0800_a8Y9ZO2bb5tk9f6l
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, 12 Nov 2009 17:24:30 +0100
Penty Wenngren <penty.wenngren@dgc.se> mentioned:

> On Wed, Nov 11, 2009 at 07:08:26PM +0100, Stanislav Sedov wrote:
> > On Wed, 11 Nov 2009 17:06:49 +0100
> > Penty Wenngren <penty.wenngren@dgc.se> mentioned:
> >=20
> > > Hello,
> > >=20
> > > After having upgraded our installed ports this morning we have a few
> > > machines that no longer want to play with ruby, dbi and postgres. This
> > > is the output I get when trying to do this in irb:
> > >=20
> > > irb(main):001:0> require 'dbi'
> > > =3D> true
> > > irb(main):002:0> dbh =3D DBI.connect("DBI:Pg:test","test","test")
> > > DBI::InterfaceError: Could not load driver (Could not find driver Pg =
or pg (error:
> > > no such file to load -- pg))
> > >     from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:318:in `load_driver'
> > >     from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:160:in `_get_full_d=
river'
> > >     from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:145:in `connect'
> > >     from (irb):2
> > >=20
> > >=20
> > > irb(main):001:0> require 'dbd/Pg'
> > > LoadError: no such file to load -- pg
> > >         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_requir=
e.rb:31:in
> > > `gem_original_require'
> > >         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_requir=
e.rb:31:in
> > > `require'
> > >         from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:40
> > >         from (irb):1:in `require'
> > >         from (irb):1
> > >=20
> > >=20
> > > # ls -l /usr/local/lib/ruby/site_ruby/1.8/dbd/
> > > total 10
> > > -rw-r--r--  1 root  wheel  6579 Nov 11 16:17 Pg.rb
> > > drwxr-xr-x  2 root  wheel   512 Nov 11 16:17 pg
> > >=20
> > >=20
> > > # pkg_info | grep ruby
> > > mod_ruby-1.3.0      An Apache module that embeds Ruby interpreter wit=
hin
> > > ruby+nopthreads-1.8.7.160_5,1 An object-oriented interpreted scriptin=
g language
> > > ruby18-aspectr-0.3.5 Ruby libraries for Aspect programming
> > > ruby18-bdb-0.6.5_1  Ruby interface to Sleepycat's Berkeley DB revisio=
n 2 or lat
> > > ruby18-dbd_pg-0.3.8 PostgreSQL driver for DBI-for-Ruby
> > > ruby18-dbi-0.4.3    DBI-for-Ruby - a common interface for SQL-based d=
atabases
> > > ruby18-eruby-1.0.5_1 Interprets Ruby code embedded in a text file lik=
e PHP/ePerl
> > > ruby18-fcgi-0.8.7   FastCGI library for Ruby
> > > ruby18-gems-1.3.5   Package management framework for the Ruby language
> > > ruby18-mmap-0.2.6   Ruby interface to manage memory-mapped file objec=
ts
> > > ruby18-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL libra=
ry
> > > ruby18-setup.rb-3.4.1 Common installer script for ruby packages
> > > rubygem-deprecated-2.0.1 A library intended to aid developers working=
 with
> > > deprecate
> > > rubygem-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL libr=
ary
> > >=20
> > >=20
> > > I have tried to reinstall ruby and all of its dependencies, but no lu=
ck.
> > >=20
> > > I hope you can shed some light on what went wrong. The packages that =
were
> > > upgraded this morning (iirc) are:
> > >=20
> > > ruby+nopthreads-1.8.7.160_5,1
> > > ruby18-aspectr-0.3.5
> > > ruby18-dbd_pg-0.3.8
> > > ruby18-dbi-0.4.3
> > > ruby18-gems-1.3.5
> > > ruby18-postgres-0.7.9.2008.01.28_1
> > > rubygem-deprecated-2.0.1
> > > rubygem-postgres-0.7.9.2008.01.28_1
> > >=20

I'm not sure how dbi/dbd works, but I runned the application
under truss(1) and it seems to be looking for pg.rb/pg.so in all
ruby and rubygems directories available, which we don't have
installed.  Maybe the dbi library should be updated to look
for pg directory instead, where all the Pg files seems to be
installed?

--=20
Stanislav Sedov
ST4096-RIPE

--Signature=_Sun__15_Nov_2009_00_17_23_-0800_a8Y9ZO2bb5tk9f6l
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iQIcBAEBAgAGBQJK/7kZAAoJEKN82nOYvCd0J8AQAI9EqSfZPY9ktHpp02SwHOdD
dsrIGzqIUe/dp0rQUDLULf1twxqr23NB4YKSwxa/FAdnENV8Xa3PfVmBe8oDAiRa
lGMzwQPl+VBwNYypNjFG6UUnKvEScSVQXwKdfEnKkaX+9k/Xkdk2TthQmsAA6LFh
2xUWOlKMWGSrQF8NWVRzRPQ0/h38AJ4iwuevSzJrX1GncQ2zlJs7RRi867xM7J8a
fY7HrgyjdkNqrr0AFdbMyku6i+mxtir0wDuCWYpJPVDp7mI1I62poKBN6NyTNlnR
BBfiDfaBu/hMQVRHtq6BQrP37HccK/9oI9NvTPrXCb+L/mdhISLEwjBZsSssJb/5
Qdgw69CwlRdcRXEr7eF2bY7jpypaTl/7kIoEO5UGnkyS83Df139KZFw+vEyaxUTO
/NIObD1E3Ut2/Suh72lK62KnbUHcPmbCFr+6+yrtd6VkYxFhqPgermYrS7qKNDd6
WLSfJNN8tJ1xthzUAm11ur/5WNzzJIIp2IAflbXyMAIg1PxUebAe3UjwENLQtHF0
qvREHwcqFxouKsFH71Wd47p3l32qRbiO/RKwij0537oH34Lh5yVj9d/xYyGYxLLK
beVs9gF3bcatnE6GbHzw/+Qjv6Sg46yfB2CvwWDYJsOwv4Zr4bk/yAWsvTdKHlVr
qdVx6okmwFeV9FnXMqpQ
=SgDB
-----END PGP SIGNATURE-----

--Signature=_Sun__15_Nov_2009_00_17_23_-0800_a8Y9ZO2bb5tk9f6l--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091115001723.baab8e25.stas>