From owner-freebsd-ruby@FreeBSD.ORG Thu Nov 12 00:17:20 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 46E64106568B for ; Thu, 12 Nov 2009 00:17:20 +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 B63B18FC0A for ; Thu, 12 Nov 2009 00:17:19 +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 922BC6A0441; Thu, 12 Nov 2009 01:00:07 +0100 (CET) Received: by picard.dgc.se (Postfix, from userid 1000) id 81F38B833; Thu, 12 Nov 2009 01:00:07 +0100 (CET) Date: Thu, 12 Nov 2009 01:00:07 +0100 From: Penty Wenngren To: Dirk Meyer Message-ID: <20091112000007.GA97224@picard.dgc.se> References: <20091111160649.GL74360@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: Thu, 12 Nov 2009 00:17:20 -0000 On Wed, Nov 11, 2009 at 07:26:31PM +0100, Dirk Meyer wrote: > > In der Nachricht vom 11.11.09 17:06 Uhr > schrieb penty.wenngren@dgc.se (Penty Wenngren) > unter dem Betreff: 'Ruby, dbi and PostgreSQL' > > > 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 > > Please try to add before require 'dbi': > > require 'rubygems' > > This should fix the problem. > Please report back. > > Hello Dirk, Thank you for your answer. I tried what you suggested, but it doesn't seem to make any difference: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'dbi' => true irb(main):003: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):3 Sorry, forgot to report the system I'm running on. They are all 7.1, two of them are running amd64 and one is running i386. All having the same problem. Before the last portupgrade everything was running fine, so I'm inclined to believe something was changed with the latest updates to ruby's dbi, but I may of course be wrong :) // Penty -- Penty Wenngren DGC Solutions AB