Date: Mon, 16 Nov 2009 16:45:33 +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: <20091116154533.GZ74360@picard.dgc.se> In-Reply-To: <CRumTC/njm@dmeyer.dinoex.sub.org> References: <iLQ6Bi/njm@dmeyer.dinoex.sub.org> <20091111160649.GL74360@picard.dgc.se> <iLQ6Bi/njm@dmeyer.dinoex.sub.org> <20091116150907.GY74360@picard.dgc.se> <CRumTC/njm@dmeyer.dinoex.sub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 16, 2009 at 04:17:48PM +0100, Dirk Meyer wrote:
> Hallo Penty Wenngren,
>
> > 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
>
> The short name never worked for me even before the update.
> Do you have a setup where it worked this way?
>
Yes, we actually have a whole bunch of scripts with the short name that
worked until the upgrade last week.
> I used for some years this form and I tested it:
> dbh = DBI.connect("DBI:Pg:dbname=mydb","user","secret")
>
I will have that in mind. Better safe than sorry, so I will convert the
connection strings in our scripts to use that form instead. I tried the
same connection string as before, but with dbname=mydb instead, and I
get the same error message.
// Penty
--
Penty Wenngren
DGC Solutions AB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091116154533.GZ74360>
