From owner-freebsd-ruby@FreeBSD.ORG Mon Nov 16 15:45:36 2009 Return-Path: Delivered-To: freebsd-ruby@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E43106566C for ; Mon, 16 Nov 2009 15:45:36 +0000 (UTC) (envelope-from penty@dgc.se) Received: from smtp05.dgcsystems.net (smtp05.dgcsystems.net [83.241.254.75]) by mx1.freebsd.org (Postfix) with ESMTP id C34588FC1C for ; Mon, 16 Nov 2009 15:45:35 +0000 (UTC) Received: from picard.dgc.se (220.248.181.62.in-addr.dgcsystems.net [62.181.248.220]) by smtp05.dgcsystems.net (Postfix) with ESMTP id 075636A475F; Mon, 16 Nov 2009 16:45:34 +0100 (CET) Received: by picard.dgc.se (Postfix, from userid 1000) id E8CD4B833; Mon, 16 Nov 2009 16:45:33 +0100 (CET) Date: Mon, 16 Nov 2009 16:45:33 +0100 From: Penty Wenngren To: Dirk Meyer Message-ID: <20091116154533.GZ74360@picard.dgc.se> References: <20091111160649.GL74360@picard.dgc.se> <20091116150907.GY74360@picard.dgc.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: DGC Solutions AB Cc: "freebsd-ruby@freebsd.org" Subject: Re: Ruby, dbi and PostgreSQL X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: penty.wenngren@dgc.se List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 15:45:36 -0000 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