pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43865: recent ruby upgrade broke some things (ruby-postgresql specifically)



The following reply was made to PR pkg/43865; it has been noted by GNATS.

From: Takahiro Kambe <taca%back-street.net@localhost>
To: gnats-bugs%NetBSD.org@localhost, explorer%netbsd.org@localhost
Cc: 
Subject: Re: pkg/43865: recent ruby upgrade broke some things
 (ruby-postgresql specifically)
Date: Sat, 11 Sep 2010 14:03:42 +0900 (JST)

 In message <20100910202500.86A6E63BCCF%www.NetBSD.org@localhost>
        on Fri, 10 Sep 2010 20:25:00 +0000 (UTC),
        explorer%netbsd.org@localhost wrote:
 > ===> Configuring for ruby18-postgresql-0.7.9.2008.01.28nb1
 > chmod -R g-w 
 > /local/pkgsrc-build/databases/ruby-postgresql/work.plaid/postgres-0.7.9.2008.01.28
 > ===> Building for ruby18-postgresql-0.7.9.2008.01.28nb1
 > => Removing backup files of patch before build 
 > ERROR:  While executing gem ... (NameError)
 >     uninitialized constant Gem::Specification::YAML
 > *** Error code 1
 Would you please execute these command's output?
 
 % ruby18 -v
 % gem18 spec /usr/pkgsrc/distfiles/postgres-0.7.9.2008.01.28.gem > /dev/null
 
 If latter commands shows the error,
 
        ERROR:  While executing gem ... (NameError)
            uninitialized constant Gem::Specification::YAML
 
 I know what's going on and I've seen this error with other version of
 rubygem.  But I don't know why it happens with rubygem 1.3.5.
 
 Would you please change /usr/pkg/lib/ruby/vendor_ruby/1.8/rubygems.rb
 as below,
 
 --- lib/rubygems.rb.orig       2009-07-21 23:46:08.000000000 +0000
 +++ lib/rubygems.rb
 @@ -1123,6 +1128,8 @@ end
  
  require 'rubygems/config_file'
  
 +STDERR.puts YAML.class
 +
  if RUBY_VERSION < '1.9' then
    require 'rubygems/custom_require'
  end
 
 And what will be output with
 
 % gem18 spec /usr/pkgsrc/distfiles/postgres-0.7.9.2008.01.28.gem > /dev/null
 
 It will be:
 
        NameError: uninitialized constant YAML
 
 or
 
        Module
 
 
 And if my understanding is correct, below patch may solve the problem.
 (But it isn't the real fix of the problem...)
 
 --- lib/rubygems/specification.rb.orig 2009-06-22 22:59:43.000000000 +0000
 +++ lib/rubygems/specification.rb
 @@ -472,6 +472,7 @@ class Gem::Specification
    # 'input' can be anything that YAML.load() accepts: String or IO.
  
    def self.from_yaml(input)
 +    require 'yaml'
      input = normalize_yaml_input input
      spec = YAML.load input
  
 
 
 -- 
 Takahiro Kambe <taca%back-street.net@localhost>
 


Home | Main Index | Thread Index | Old Index