From nobody@FreeBSD.org  Sun Oct 21 02:01:42 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC56F16A54B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2007 02:01:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3489313C4AC
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2007 02:01:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9L21MsI066246
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2007 02:01:22 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l9L21M1H066245;
	Sun, 21 Oct 2007 02:01:22 GMT
	(envelope-from nobody)
Message-Id: <200710210201.l9L21M1H066245@www.freebsd.org>
Date: Sun, 21 Oct 2007 02:01:22 GMT
From: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: databases/ruby-dbd_pg is not ready to use
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: boumenot@gmail.com

>Number:         117367
>Category:       ports
>Synopsis:       databases/ruby-dbd_pg is not ready to use
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    clsung
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 21 02:10:00 UTC 2007
>Closed-Date:    Fri May 30 02:06:07 UTC 2008
>Last-Modified:  Fri May 30 02:06:07 UTC 2008
>Originator:     Motomichi Matsuzaki
>Release:        6.2-RELEASE w/ latest ports
>Organization:
>Environment:
FreeBSD localhost 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 15:04:52 UTC 2007     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/SMP  amd64
>Description:
databases/ruby-dbd_pg is a database driver for PostgreSQL in Ruby DBI.
As mentioned in the Ruby DBI project site (http://ruby-dbi.rubyforge.org/),
programmers can access databases in a vendor independent manner using Ruby DBI.

Generally said, programmers must load "dbi" interface library only.
But in the current databases/ruby-dbd_pg modified months ago, we have to load another library "rubygems", because the backend library databases/ruby-postgres have changed to be installed through RubyGem packaging framework.
This introduced inconsistency between driver libraries (DBDs) and portability problems into DBI-based ruby scripts.

The port should be fixed as to be used independent from "rubygems".

>How-To-Repeat:
mzaki$ ruby -e 'require "dbi"; DBI.connect("dbi:Pg:dbname=template1", "pgsql") {|dbh| puts dbh.select_one("SELECT 85 * 771")}'
/usr/local/lib/ruby/site_ruby/1.8/dbi.rb:344:in `load_driver': Could not load driver (no such file to load -- postgres) (DBI::InterfaceError)
        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:227:in `_get_full_driver'
        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:213:in `connect'
        from -e:1

To work correctly, loading "rubygems" is required:

mzaki$ ruby -e 'require "dbi"; require "rubygems"; DBI.connect("dbi:Pg:dbname=template1", "pgsql") {|dbh| puts dbh.select_one("SELECT 85 * 771")}'
65535

In case of databases/ruby-dbd_sqlite, for comparison:

mzaki$ ruby -e 'require "dbi"; DBI.connect("dbi:SQLite:hoge.db") {|dbh| puts dbh.select_one("SELECT 85 * 771")}'
65535

>Fix:
ruby-postgres port should be installed independently from rubygem framework.
Roll back repocopying databases/ruby-postgres to databases/rubygem-postgres.

Then databases/ruby-dbd_pg should depend on databases/ruby-postgres, not on databases/rubygem-postgres.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->clsung 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Oct 21 02:10:06 UTC 2007 
Responsible-Changed-Why:  
clsung@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117367 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Oct 21 02:10:09 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117367 

From: "Christopher Boumenot" <boumenot@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/117367: databases/ruby-dbd_pg is not ready to use
Date: Fri, 2 Nov 2007 09:46:29 -0400

 Thanks, I'll take a look at this.
 
 On Sun, 21 Oct 2007 02:10:07 UT, Edwin Groothuis <edwin@freebsd.org> wrote:
 > Maintainer of databases/ruby-dbd_pg,
 >
 > Please note that PR ports/117367 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/117367
 >
 > --
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 >
State-Changed-From-To: feedback->closed 
State-Changed-By: lippe 
State-Changed-When: Fri May 30 02:06:06 UTC 2008 
State-Changed-Why:  
Already fixed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117367 
>Unformatted:
