Using DBI method for DB access (in our case PostgreSQL 8.4.4-server) requiring class 'dbi' immediately results in this error: /usr/local/lib/ruby/site_ruby/1.8/dbi/utils/date.rb:57: undefined method `deprecate' for DBI::Date:Class (NoMethodError) 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/dbi/utils.rb:56 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/dbi.rb:50 How-To-Repeat: Install ruby18, install databases/ruby-dbi, require 'dbi' in any ruby script for using DBI class for DB access.
Responsible Changed From-To: freebsd-ports-bugs->ruby Over to maintainer (via the GNATS Auto Assign Tool)
Hello there! I've found a workaround. I have just found that everything was broken by devel/rubygem-deprecated port. It's version was changed from 2.0.1 to 3.0.0 with complete syntax and semantics re-write. So to solve the problem we should either downgrade devel/rubygem-deprecated back to 2.0.1 or rewrite the DBI library. -- Sincerely yours, Pavel Argentov. RIPE: PA5363-RIPE
On 06/29/10 19:43, Pavel Argentov wrote: > Hello there! > > I've found a workaround. > > I have just found that everything was broken by devel/rubygem-deprecated port. It's version was > changed from 2.0.1 to 3.0.0 with complete syntax and semantics re-write. So to solve the problem we > should either downgrade devel/rubygem-deprecated back to 2.0.1 or rewrite the DBI library. > Hello. deleting and reinstalling necessary ruby-gems by demand can be considered as a temporary workaround. I found some hints regarding this issue in the net, tried it and it worked for me. Regards, Oliver
01.07.2010 11:20, O. Hartmann wrote: > deleting and reinstalling necessary ruby-gems by demand can be > considered as a temporary workaround. I found some hints regarding this > issue in the net, tried it and it worked for me. Would you please remind us how to do that "by demand". I'm not a doc in ruby gems so I would appreciate some more instruction ;-) What I did was just replacing the ports/x/y directory and portupgrade -f x/y. If there's smoother way I'd be glad to know it ;-) -- Sincerely yours, Pavel Argentov. RIPE: PA5363-RIPE
I've submitted a new port for version2 of the deprecated gem. The PR is ports/150775 Attached and included inline below (although the email may mangle it) is a patch to databases/ruby-dbi that make use of my 'new' depreciated2 gem port. The patch includes changes to the Makefile to move the dependency on rubygem-deprecated to the 'new' rubygem-deprecated2 and also includes two patches (patch-lib-dbi-columninfo.rb and patch-lib-dbi.rb) to the ruby-dbi source to ensure it makes use of v2 of the gem if v3 is also installed on the system, i.e. They change gem "deprecated" Into gem "deprecated", '~> 2.0' I'm not a user of ruby-dbi and have no desire to rewrite the DBI library, hence this solution. Because I'm not a user I have only tested it by 'requiring' it in a script, however I don't think any of the changes are significant enough to break it (especially given it's already broken!) I hope it is of use in solving your issues with ruby-dbi Regards Eric --BEGIN-- diff -rupN ruby-dbi.orig/Makefile ruby-dbi/Makefile --- ruby-dbi.orig/Makefile 2009-10-29 11:44:12.000000000 +0000 +++ ruby-dbi/Makefile 2010-09-21 08:27:45.000000000 +0100 @@ -17,7 +17,7 @@ MAINTAINER= ruby@FreeBSD.org COMMENT= DBI-for-Ruby - a common interface for SQL-based databases RUN_DEPENDS= ${RUBY_SITELIBDIR}/aspectr.rb:${PORTSDIR}/devel/ruby-aspectr \ - rubygem-deprecated>0:${PORTSDIR}/devel/rubygem-deprecated + rubygem-deprecated2>2.0.0:${PORTSDIR}/devel/rubygem-deprecated2 USE_RUBY= yes USE_RUBY_SETUP= yes diff -rupN ruby-dbi.orig/files/patch-lib-dbi-columninfo.rb ruby-dbi/files/patch-lib-dbi-columninfo.rb --- ruby-dbi.orig/files/patch-lib-dbi-columninfo.rb 1970-01-01 01:00:00.000000000 +0100 +++ ruby-dbi/files/patch-lib-dbi-columninfo.rb 2010-09-21 08:27:45.000000000 +0100 @@ -0,0 +1,11 @@ +--- lib/dbi/columninfo.rb.orig 2009-05-31 11:12:23.000000000 +0100 ++++ lib/dbi/columninfo.rb 2010-09-20 21:14:38.000000000 +0100 +@@ -2,7 +2,7 @@ + + begin + require 'rubygems' +- gem 'deprecated' ++ gem 'deprecated', '~> 2.0' + rescue LoadError => e + end + diff -rupN ruby-dbi.orig/files/patch-lib-dbi.rb ruby-dbi/files/patch-lib-dbi.rb --- ruby-dbi.orig/files/patch-lib-dbi.rb 1970-01-01 01:00:00.000000000 +0100 +++ ruby-dbi/files/patch-lib-dbi.rb 2010-09-21 08:27:45.000000000 +0100 @@ -0,0 +1,11 @@ +--- lib/dbi.rb.orig 2009-09-13 21:43:32.000000000 +0100 ++++ lib/dbi.rb 2010-09-20 21:14:10.000000000 +0100 +@@ -37,7 +37,7 @@ + + begin + require "rubygems" +- gem "deprecated" ++ gem "deprecated", '~> 2.0' + rescue LoadError + end +
Responsible Changed From-To: ruby->pgollucci I will take it.
State Changed From-To: open->closed Committed, Thanks!
pgollucci 2010-12-10 23:02:34 UTC FreeBSD ports repository Modified files: databases/ruby-dbi Makefile Log: - Fix databases/ruby-dbi: /usr/local/lib/ruby/site_ruby/1.8/dbi/utils/date.rb:57: undefined method `deprecate' for DBI::Date:Class (NoMethodError) - Bump PORTREVISION PR: ports/147809 Submitted by: Hartmann, O. <ohartman@mail.zedat.fu-berlin.de> With Hat: ruby@ Sponsored by: RideCharge Inc. / TaxiMagic Revision Changes Path 1.21 +2 -1 ports/databases/ruby-dbi/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"