Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Nov 2009 16:09:07 +0100
From:      Penty Wenngren <penty.wenngren@dgc.se>
To:        Dirk Meyer <dirk.meyer@dinoex.sub.org>
Cc:        "freebsd-ruby@freebsd.org" <freebsd-ruby@freebsd.org>
Subject:   Re: Ruby, dbi and PostgreSQL
Message-ID:  <20091116150907.GY74360@picard.dgc.se>
In-Reply-To: <iLQ6Bi/njm@dmeyer.dinoex.sub.org>
References:  <20091111160649.GL74360@picard.dgc.se> <iLQ6Bi/njm@dmeyer.dinoex.sub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 15, 2009 at 10:56:06AM +0100, Dirk Meyer wrote:
> 
> > 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:
> > 
> > irb(main):001:0> require 'dbi'
> > => true
> > irb(main):002:0> dbh = 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_driver'
> >     from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:145:in `connect'
> >     from (irb):2
>  
> The update to ruby18-dbd_pg-0.3.8 is wrong.
> seems that my patches where not commited.
> I will merge my patches and commit the necessary fixes.
> 
> > ruby18-dbd_pg-0.3.8
> 


Thanks Dirk, it seems your patches solved that problem. However, now I get
another error message instead:

$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'dbi'
=> true
irb(main):003:0> dbh = DBI.connect("DBI:Pg:mydb","user","secret")
DBI::OperationalError: can't format
        from /usr/local/lib/ruby/site_ruby/1.8/dbd/pg/database.rb:82:in
`initialize'
        from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:157:in `new'
        from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:157:in `connect'
        from /usr/local/lib/ruby/site_ruby/1.8/dbi/handles/driver.rb:33:in
`connect'
        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:148:in `connect'
        from (irb):3


// Penty

-- 

Penty Wenngren
DGC Solutions AB



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