From owner-freebsd-ruby@FreeBSD.ORG Sun Nov 8 06:34:54 2009 Return-Path: Delivered-To: ruby@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C15106566B for ; Sun, 8 Nov 2009 06:34:54 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF128FC0A for ; Sun, 8 Nov 2009 06:34:53 +0000 (UTC) Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 08 Nov 2009 01:06:05 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr08.lnh.mail.rcn.net (MOS 3.10.7-GA) with ESMTP id LFU37275; Sun, 8 Nov 2009 01:05:58 -0500 (EST) Received: from 209-6-91-204.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.91.204]) by smtp01.lnh.mail.rcn.net with ESMTP; 08 Nov 2009 01:05:58 -0500 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19190.24518.198408.731167@jerusalem.litteratus.org> Date: Sun, 8 Nov 2009 01:05:58 -0500 To: ruby@FreeBSD.org X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr08.lnh.mail.rcn.net) Cc: Subject: problem with portupgrade-devel X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 06:34:54 -0000 Hello: It crashes with: huff@jerusalem>> portupgrade -R bash-4.0.33/ [Gathering depends for shells/bash ....../usr/local/sbin/portupgrade:878:in `get_all_depends': private method `scan' called for # (NoMethodError) from /usr/local/sbin/portupgrade:871:in `get_all_depends' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/lib/ruby/1.8/set.rb:195:in `each_key' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/sbin/portupgrade:870:in `get_all_depends' from /usr/local/sbin/portupgrade:871:in `get_all_depends' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/lib/ruby/1.8/set.rb:195:in `each_key' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/sbin/portupgrade:870:in `get_all_depends' from /usr/local/sbin/portupgrade:871:in `get_all_depends' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/lib/ruby/1.8/set.rb:195:in `each_key' from /usr/local/lib/ruby/1.8/set.rb:195:in `each' from /usr/local/sbin/portupgrade:870:in `get_all_depends' from /usr/local/sbin/portupgrade:633:in `main' from /usr/local/sbin/portupgrade:607:in `each' from /usr/local/sbin/portupgrade:607:in `main' from /usr/local/sbin/portupgrade:582:in `catch' from /usr/local/sbin/portupgrade:582:in `main' from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `call' from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `parse_in_order' from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `catch' from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `parse_in_order' from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `catch' from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order' from /usr/local/lib/ruby/1.8/optparse.rb:1248:in `order!' from /usr/local/lib/ruby/1.8/optparse.rb:1241:in `order' from /usr/local/sbin/portupgrade:559:in `main' from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize' from /usr/local/sbin/portupgrade:231:in `new' from /usr/local/sbin/portupgrade:231:in `main' from /usr/local/sbin/portupgrade:2213 I've rebuild portupgrade-devel, rubt, and ruby18-bdb42 ... still fails. What have I mucked up? Respectfully, Robert Huff From owner-freebsd-ruby@FreeBSD.ORG Mon Nov 9 11:08:25 2009 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A70410656A8 for ; Mon, 9 Nov 2009 11:08:25 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F39BD8FC17 for ; Mon, 9 Nov 2009 11:08:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9B8Owp080333 for ; Mon, 9 Nov 2009 11:08:24 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA9B8O4H080331 for ruby@FreeBSD.org; Mon, 9 Nov 2009 11:08:24 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 9 Nov 2009 11:08:24 GMT Message-Id: <200911091108.nA9B8O4H080331@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: ruby@FreeBSD.org Cc: Subject: Current problem reports assigned to ruby@FreeBSD.org X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 11:08:25 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/140364 ruby ports-mgmt/portupgrade-devel: #! line substitution is o ports/140273 ruby ports-mgmt/portupgrade-devel chokes on bsdpan pkgs o ports/140192 ruby ports-mgmt/portupgrade-devel fails to install a new po o ports/140008 ruby ports-mgmt/portupgrade: many papercut omissions on por o ports/138796 ruby [patch] - update converters/ruby-lv o ports/137958 ruby ports-mgmt/portupgrade fails with recursive dependency o ports/137708 ruby ports-mgmt/portupgrade: portupgrade -cRn is broken s ports/134714 ruby ports-mgmt/portupgrade deletes user data without quest o ports/134182 ruby ports-mgmt/portupgrade incorrectly handles manual reje o ports/131111 ruby ports-mgmt/portupgrade-devel: completely removes packa o ports/129930 ruby ports-mgmt/portupgrade - portinstall tries to install o ports/129891 ruby ports-mgmt/portupgrade fails to recognize variations o o ports/128881 ruby ports-mgmt/portupgrade backtrace o ports/127889 ruby ports-mgmt/portupgrade detects spurious failures and s o ports/127019 ruby ports-mgmt/portupgrade does not recognize fail conditi o ports/126140 ruby ports-mgmt/portupgrade runtime error o ports/125936 ruby ports-mgmt/portupgrade -R fails if BUILD_DEP's are not o ports/112818 ruby ports-mgmt/portupgrade -a fails with database error 18 problems total. From owner-freebsd-ruby@FreeBSD.ORG Wed Nov 11 01:50:04 2009 Return-Path: Delivered-To: ruby@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E7B106566B for ; Wed, 11 Nov 2009 01:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A79508FC17 for ; Wed, 11 Nov 2009 01:50:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAB1o4F5020800 for ; Wed, 11 Nov 2009 01:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nAB1o4BC020799; Wed, 11 Nov 2009 01:50:04 GMT (envelope-from gnats) Date: Wed, 11 Nov 2009 01:50:04 GMT Message-Id: <200911110150.nAB1o4BC020799@freefall.freebsd.org> To: ruby@FreeBSD.org From: Alexander Best Cc: Subject: Re: ports/135691: ports-mgmt/portupgrade Wrong example in man page of pkgdb(1) X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Best List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 01:50:04 -0000 The following reply was made to PR ports/135691; it has been noted by GNATS. From: Alexander Best To: Stanislav Sedov Cc: Subject: Re: ports/135691: ports-mgmt/portupgrade Wrong example in man page of pkgdb(1) Date: Wed, 11 Nov 2009 02:46:18 +0100 (CET) thanks for committing the change request i issued in that pr. just noticed that you might want to change the directories in the example too since nowadays /usr/X11R6 is linked to /usr/local. so running the current example probably returns all files not installed by a package twice. maybe this example makes more sense: find /usr/local/lib /usr/local/include -print0 -type f | xargs -0 pkg_which -v | fgrep '?' cheers. alex From owner-freebsd-ruby@FreeBSD.ORG Wed Nov 11 16:23:50 2009 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43E61065695 for ; Wed, 11 Nov 2009 16:23:50 +0000 (UTC) (envelope-from penty@dgc.se) Received: from smtp04.dgcsystems.net (smtp04.dgcsystems.net [83.241.254.81]) by mx1.freebsd.org (Postfix) with ESMTP id 5AEEC8FC12 for ; Wed, 11 Nov 2009 16:23:50 +0000 (UTC) Received: from picard.dgc.se (220.248.181.62.in-addr.dgcsystems.net [62.181.248.220]) by smtp04.dgcsystems.net (Postfix) with ESMTP id 6A9D11D16B for ; Wed, 11 Nov 2009 17:05:39 +0100 (CET) Received: by picard.dgc.se (Postfix, from userid 1000) id 82884B833; Wed, 11 Nov 2009 17:06:49 +0100 (CET) Date: Wed, 11 Nov 2009 17:06:49 +0100 From: Penty Wenngren To: ruby@FreeBSD.org Message-ID: <20091111160649.GL74360@picard.dgc.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Organization: DGC Solutions AB Cc: Subject: 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: Wed, 11 Nov 2009 16:23:50 -0000 Hello, 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 irb(main):001:0> require 'dbd/Pg' LoadError: no such file to load -- pg from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:40 from (irb):1:in `require' from (irb):1 # ls -l /usr/local/lib/ruby/site_ruby/1.8/dbd/ total 10 -rw-r--r-- 1 root wheel 6579 Nov 11 16:17 Pg.rb drwxr-xr-x 2 root wheel 512 Nov 11 16:17 pg # pkg_info | grep ruby mod_ruby-1.3.0 An Apache module that embeds Ruby interpreter within ruby+nopthreads-1.8.7.160_5,1 An object-oriented interpreted scripting language ruby18-aspectr-0.3.5 Ruby libraries for Aspect programming ruby18-bdb-0.6.5_1 Ruby interface to Sleepycat's Berkeley DB revision 2 or lat ruby18-dbd_pg-0.3.8 PostgreSQL driver for DBI-for-Ruby ruby18-dbi-0.4.3 DBI-for-Ruby - a common interface for SQL-based databases ruby18-eruby-1.0.5_1 Interprets Ruby code embedded in a text file like PHP/ePerl ruby18-fcgi-0.8.7 FastCGI library for Ruby ruby18-gems-1.3.5 Package management framework for the Ruby language ruby18-mmap-0.2.6 Ruby interface to manage memory-mapped file objects ruby18-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library ruby18-setup.rb-3.4.1 Common installer script for ruby packages rubygem-deprecated-2.0.1 A library intended to aid developers working with deprecate rubygem-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library I have tried to reinstall ruby and all of its dependencies, but no luck. I hope you can shed some light on what went wrong. The packages that were upgraded this morning (iirc) are: ruby+nopthreads-1.8.7.160_5,1 ruby18-aspectr-0.3.5 ruby18-dbd_pg-0.3.8 ruby18-dbi-0.4.3 ruby18-gems-1.3.5 ruby18-postgres-0.7.9.2008.01.28_1 rubygem-deprecated-2.0.1 rubygem-postgres-0.7.9.2008.01.28_1 // Penty -- Penty Wenngren DGC Solutions AB From owner-freebsd-ruby@FreeBSD.ORG Wed Nov 11 18:08:37 2009 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3655B1065693 for ; Wed, 11 Nov 2009 18:08:37 +0000 (UTC) (envelope-from stas@SpringDaemons.com) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id D19F78FC35 for ; Wed, 11 Nov 2009 18:08:36 +0000 (UTC) Received: from sputnik.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 436568FC51; Wed, 11 Nov 2009 21:08:34 +0300 (MSK) Received: by sputnik.SpringDaemons.com (Postfix, from userid 1024) id DD2CAB86F; Wed, 11 Nov 2009 10:08:31 -0800 (PST) Date: Wed, 11 Nov 2009 10:08:26 -0800 From: Stanislav Sedov To: penty.wenngren@dgc.se Message-Id: <20091111100826.e0dcfdca.stas@FreeBSD.org> In-Reply-To: <20091111160649.GL74360@picard.dgc.se> References: <20091111160649.GL74360@picard.dgc.se> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__11_Nov_2009_10_08_26_-0800_YXUE.i6/b+m23drQ" Cc: ruby@FreeBSD.org Subject: Re: Ruby, dbi and PostgreSQL X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 18:08:37 -0000 --Signature=_Wed__11_Nov_2009_10_08_26_-0800_YXUE.i6/b+m23drQ Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 11 Nov 2009 17:06:49 +0100 Penty Wenngren mentioned: > Hello, >=20 > 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: >=20 > irb(main):001:0> require 'dbi' > =3D> true > irb(main):002:0> dbh =3D DBI.connect("DBI:Pg:test","test","test") > DBI::InterfaceError: Could not load driver (Could not find driver Pg or p= g (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_drive= r' > from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:145:in `connect' > from (irb):2 >=20 >=20 > irb(main):001:0> require 'dbd/Pg' > LoadError: no such file to load -- pg > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb= :31:in > `gem_original_require' > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb= :31:in > `require' > from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:40 > from (irb):1:in `require' > from (irb):1 >=20 >=20 > # ls -l /usr/local/lib/ruby/site_ruby/1.8/dbd/ > total 10 > -rw-r--r-- 1 root wheel 6579 Nov 11 16:17 Pg.rb > drwxr-xr-x 2 root wheel 512 Nov 11 16:17 pg >=20 >=20 > # pkg_info | grep ruby > mod_ruby-1.3.0 An Apache module that embeds Ruby interpreter within > ruby+nopthreads-1.8.7.160_5,1 An object-oriented interpreted scripting la= nguage > ruby18-aspectr-0.3.5 Ruby libraries for Aspect programming > ruby18-bdb-0.6.5_1 Ruby interface to Sleepycat's Berkeley DB revision 2 = or lat > ruby18-dbd_pg-0.3.8 PostgreSQL driver for DBI-for-Ruby > ruby18-dbi-0.4.3 DBI-for-Ruby - a common interface for SQL-based datab= ases > ruby18-eruby-1.0.5_1 Interprets Ruby code embedded in a text file like PH= P/ePerl > ruby18-fcgi-0.8.7 FastCGI library for Ruby > ruby18-gems-1.3.5 Package management framework for the Ruby language > ruby18-mmap-0.2.6 Ruby interface to manage memory-mapped file objects > ruby18-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library > ruby18-setup.rb-3.4.1 Common installer script for ruby packages > rubygem-deprecated-2.0.1 A library intended to aid developers working with > deprecate > rubygem-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library >=20 >=20 > I have tried to reinstall ruby and all of its dependencies, but no luck. >=20 > I hope you can shed some light on what went wrong. The packages that were > upgraded this morning (iirc) are: >=20 > ruby+nopthreads-1.8.7.160_5,1 > ruby18-aspectr-0.3.5 > ruby18-dbd_pg-0.3.8 > ruby18-dbi-0.4.3 > ruby18-gems-1.3.5 > ruby18-postgres-0.7.9.2008.01.28_1 > rubygem-deprecated-2.0.1 > rubygem-postgres-0.7.9.2008.01.28_1 >=20 >=20 > // Penty >=20 > --=20 >=20 Hi, Penty! I'm not sure this is the case, but I'd guess that postgresql client library is threaded and ruby is not, so it can't load the postgresql library. What FreeBSD version do you use? Pthreaded ruby on everything before 7.2 is not fully functional (e.g. fork won't work as it requires malloc implementation to support forking in threaded program). The best way for you if you're using postgresql in ruby will be to update the OS to 7.2 or above. You can also try to use ruby with threades (by commenting the '# pthreads in earlier versions has problems wi= th malloc after fork' section in Makefile), but keep in mind that fork and other fork(2)-based functions won't work. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Wed__11_Nov_2009_10_08_26_-0800_YXUE.i6/b+m23drQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iQIcBAEBAgAGBQJK+v2eAAoJEKN82nOYvCd0YncP/Atb8GoW7WevWmoumM3Za69o JRUeWy/FrzCwv4MY8GWCeRB0qkONjqXegpamd2dlD9tyIbDYD/Pgsy43N9C8Xawn 7Dqkfv+hYvkgzRxcYwojyG9DApNKQtdRirwTJvhMmsemNMfGk9JbSwyChC+MhKwY vLrw4Lmd4SBhcaezkevbX+dyq74uuilAIbV/vpjVwwoT0ScxiJIMxvMYQkxPEkN7 n2QjfsM2DuRd6cXcR8SNUwU462XPmo+eoIB/EzDmvLXzZH4G1UstxIgJ3T5NhwWF p5ymf0eN6WFyZUry+q0gOJXjnElTlHCiuZIxFZPRyK5odr6+AZ+UDur8uzFDdl7L OgShvyqZdfA+Okdk6mVLOLXfiWYDY8ILnb6DmPlmUGzPR2pWahEuJa07tXHf50kO 2ZACSDM0tnvCt4KbzTjpxueX3t9bPL5Mbnmp1et6JEckmQ/YEzW6KH6qDYgAoILO 8aETw09TVsI9bxyjXIbH8YubAnRuG2am95QphHgNUo/GMdixEuh97GsSd7Q/qL72 YqdMh/Zb5GTj85TY+KCfyK0t2XiOtoftAkTCd5IhPrdmfXoeRkcKhahn+HhN5Lgk UTLBL7DRskQ8SmREaUXK7xmyY4mUpkSvxQwnj+TwFGc5mgqfkuaUhcjxMwYy7y/j 82isD541/Ub538WT7g7j =e7Xg -----END PGP SIGNATURE----- --Signature=_Wed__11_Nov_2009_10_08_26_-0800_YXUE.i6/b+m23drQ-- 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 From owner-freebsd-ruby@FreeBSD.ORG Thu Nov 12 16:24:33 2009 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 187201065670; Thu, 12 Nov 2009 16:24:33 +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 828918FC17; Thu, 12 Nov 2009 16:24:32 +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 C3A8A6A0786; Thu, 12 Nov 2009 17:24:30 +0100 (CET) Received: by picard.dgc.se (Postfix, from userid 1000) id 937A2B833; Thu, 12 Nov 2009 17:24:30 +0100 (CET) Date: Thu, 12 Nov 2009 17:24:30 +0100 From: Penty Wenngren To: Stanislav Sedov Message-ID: <20091112162430.GP74360@picard.dgc.se> References: <20091111160649.GL74360@picard.dgc.se> <20091111100826.e0dcfdca.stas@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20091111100826.e0dcfdca.stas@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Organization: DGC Solutions AB Cc: "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 16:24:33 -0000 On Wed, Nov 11, 2009 at 07:08:26PM +0100, Stanislav Sedov wrote: > On Wed, 11 Nov 2009 17:06:49 +0100 > Penty Wenngren mentioned: > > > Hello, > > > > 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 > > > > > > irb(main):001:0> require 'dbd/Pg' > > LoadError: no such file to load -- pg > > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `gem_original_require' > > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `require' > > from /usr/local/lib/ruby/site_ruby/1.8/dbd/Pg.rb:40 > > from (irb):1:in `require' > > from (irb):1 > > > > > > # ls -l /usr/local/lib/ruby/site_ruby/1.8/dbd/ > > total 10 > > -rw-r--r-- 1 root wheel 6579 Nov 11 16:17 Pg.rb > > drwxr-xr-x 2 root wheel 512 Nov 11 16:17 pg > > > > > > # pkg_info | grep ruby > > mod_ruby-1.3.0 An Apache module that embeds Ruby interpreter within > > ruby+nopthreads-1.8.7.160_5,1 An object-oriented interpreted scripting language > > ruby18-aspectr-0.3.5 Ruby libraries for Aspect programming > > ruby18-bdb-0.6.5_1 Ruby interface to Sleepycat's Berkeley DB revision 2 or lat > > ruby18-dbd_pg-0.3.8 PostgreSQL driver for DBI-for-Ruby > > ruby18-dbi-0.4.3 DBI-for-Ruby - a common interface for SQL-based databases > > ruby18-eruby-1.0.5_1 Interprets Ruby code embedded in a text file like PHP/ePerl > > ruby18-fcgi-0.8.7 FastCGI library for Ruby > > ruby18-gems-1.3.5 Package management framework for the Ruby language > > ruby18-mmap-0.2.6 Ruby interface to manage memory-mapped file objects > > ruby18-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library > > ruby18-setup.rb-3.4.1 Common installer script for ruby packages > > rubygem-deprecated-2.0.1 A library intended to aid developers working with > > deprecate > > rubygem-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library > > > > > > I have tried to reinstall ruby and all of its dependencies, but no luck. > > > > I hope you can shed some light on what went wrong. The packages that were > > upgraded this morning (iirc) are: > > > > ruby+nopthreads-1.8.7.160_5,1 > > ruby18-aspectr-0.3.5 > > ruby18-dbd_pg-0.3.8 > > ruby18-dbi-0.4.3 > > ruby18-gems-1.3.5 > > ruby18-postgres-0.7.9.2008.01.28_1 > > rubygem-deprecated-2.0.1 > > rubygem-postgres-0.7.9.2008.01.28_1 > > > > > > // Penty > > > > -- > > > > Hi, Penty! > > I'm not sure this is the case, but I'd guess that postgresql client > library is threaded and ruby is not, so it can't load the postgresql > library. What FreeBSD version do you use? Pthreaded ruby on everything > before 7.2 is not fully functional (e.g. fork won't work as it requires > malloc implementation to support forking in threaded program). > > The best way for you if you're using postgresql in ruby will be to > update the OS to 7.2 or above. You can also try to use ruby with > threades (by commenting the '# pthreads in earlier versions has problems with malloc after fork' section in Makefile), but keep in mind that > fork and other fork(2)-based functions won't work. > > -- > Stanislav Sedov > ST4096-RIPE Hello again! I have now tried the same on a 7.2 system, and I get the same error: # uname -mprsv FreeBSD 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct 2 08:22:32 UTC 2009 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 amd64 # pkg_info autoconf-2.62 Automatically configure source code on many Un*x platforms autoconf-wrapper-20071109 Wrapper script for GNU autoconf automake-1.10.1 GNU Standards-compliant Makefile generator (1.10) automake-wrapper-20071109 Wrapper script for GNU automake gettext-0.17_1 GNU gettext package gmake-3.81_3 GNU version of 'make' utility help2man-1.36.4_3 Automatically generating simple manual pages from program o libdbi-0.8.3 Database Independent Abstraction Layer for C libdbi-drivers-0.8.3.1_2 Drivers for libdbi libiconv-1.13.1 A character set conversion library libtool-2.2.6a_1 Generic shared library support script m4-1.4.13,1 GNU m4 p5-gettext-1.05_2 Message handling functions perl-5.8.9_3 Practical Extraction and Report Language portaudit-0.5.14 Checks installed ports against a list of security vulnerabi postgresql-client-8.3.7,1 PostgreSQL database (client) ruby-1.8.7.160_5,1 An object-oriented interpreted scripting language ruby18-aspectr-0.3.5 Ruby libraries for Aspect programming ruby18-dbd_pg-0.3.8 PostgreSQL driver for DBI-for-Ruby ruby18-dbi-0.4.3 DBI-for-Ruby - a common interface for SQL-based databases ruby18-gems-1.3.5 Package management framework for the Ruby language ruby18-postgres-0.7.9.2008.01.28_1 Ruby interface to PostgreSQL library rubygem-deprecated-2.0.1 A library intended to aid developers working with deprecate # irb 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 // Penty -- Penty Wenngren DGC Solutions AB