Ruby, dbi and PostgreSQL
Penty Wenngren
penty.wenngren at dgc.se
Fri Nov 20 15:17:03 UTC 2009
On Tue, Nov 17, 2009 at 06:12:41PM +0100, Dirk Meyer wrote:
> Penty Wenngren schrieb:,
>
> > 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
>
> There is an API breakage in the underlying postgres module.
>
> Please install:
> ruby18-dbd_pg-0.3.8_2
> ruby18-pg-0.8.0
>
> I verified it works here with just:
> require 'dbi'
> dbh = DBI.connect("DBI:Pg:mydb","user","secret")
>
It took some time for ports to get updated, but after having upgraded to
the latest versions it seems to work just fine now. Thank you very much :)
// Penty
--
Penty Wenngren
DGC Solutions AB
More information about the freebsd-ruby
mailing list