Bug #2717
Requiring rubygems/specification causes tons of warnings for NoMethodError
| Status: | Closed | Start date: | 02/07/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | lib | |||
| Target version: | 2.0.0 | |||
| ruby -v: | ruby 1.9.2dev (2010-02-07 trunk 26607) [x86_64-darwin10.2.0] |
Description
Strictly speaking this is a third party issue and already reported as http://rubyforge.org/tracker/index.php?func=detail&aid=27087&group_id=126&atid=575 at 2009-09-10 but is still open with no response. I'll post this so that other core developpers have chance to know the issue. $ ruby -v -rrubygems/specification -e 1 ruby 1.9.2dev (2010-02-07 trunk 26607) [x86_64-darwin10.2.0] /usr/local/lib/ruby/1.9.1/rubygems/source_index.rb:8: warning: loading in progress, circular require considered harmful - /usr/local/lib/ruby/1.9.1/rubygems/specification.rb from ruby:0:in `require' from /usr/local/lib/ruby/1.9.1/rubygems/specification.rb:28:in `<top (required)>' from /usr/local/lib/ruby/1.9.1/rubygems/specification.rb:1038:in `<class:Specification>' from <internal:gem_prelude>:273:in `const_missing' from <internal:gem_prelude>:161:in `load_full_rubygems_library' from <internal:gem_prelude>:161:in `require' from /usr/local/lib/ruby/1.9.1/rubygems.rb:1073:in `<top (required)>' from /usr/local/lib/ruby/1.9.1/rubygems.rb:1073:in `require' from /usr/local/lib/ruby/1.9.1/rubygems/source_index.rb:8:in `<top (required)>' from /usr/local/lib/ruby/1.9.1/rubygems/source_index.rb:8:in `require' /usr/local/lib/ruby/1.9.1/rubygems/specification.rb:530: warning: instance variable @specification_version not initialized WARNING: #<NoMethodError: undefined method `>' for nil:NilClass> Gem::Specification.new do |s| s.name = "minitest" s.version = "1.5.0" s.summary = "This minitest is bundled with Ruby" end WARNING: Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.9.1/specifications/minitest.gemspec' /usr/local/lib/ruby/1.9.1/rubygems/specification.rb:530: warning: instance variable @specification_version not initialized WARNING: #<NoMethodError: undefined method `>' for nil:NilClass> Gem::Specification.new do |s| s.name = "rake" s.version = "0.8.7" s.summary = "This rake is bundled with Ruby" end WARNING: Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.9.1/specifications/rake.gemspec' /usr/local/lib/ruby/1.9.1/rubygems/specification.rb:530: warning: instance variable @specification_version not initialized WARNING: #<NoMethodError: undefined method `>' for nil:NilClass> Gem::Specification.new do |s| s.name = "rdoc" s.version = "2.2.2" s.summary = "This rdoc is bundled with Ruby" end WARNING: Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.9.1/specifications/rdoc.gemspec'
History
Updated by sakuro (Sakuro OZAWA) over 2 years ago
fyi, this is a clean install (configure && make && sudo make install) and rubygems-update 1.3.5 is *not* installed. gem list *** LOCAL GEMS *** minitest (1.5.0) rake (0.8.7) rdoc (2.2.2)
Updated by naruse (Yui NARUSE) over 2 years ago
- Category set to lib
- Status changed from Open to Assigned
- Assignee set to drbrain (Eric Hodel)
Updated by drbrain (Eric Hodel) about 2 years ago
I'm not sure what to do about this yet. gem_prelude.rb provides a fake rubygems.rb, but require 'rubygems/specification' does not cause the real rubygems.rb to be loaded. This causes the errors. The workaround is to assume that Gem::Specification is available, because require 'rubygems' provides it instead of requiring 'rubygem/specification'.
Updated by mame (Yusuke Endoh) almost 2 years ago
- Assignee changed from drbrain (Eric Hodel) to nobu (Nobuyoshi Nakada)
Hi, Nobu, do you have any idea? -- Yusuke Endoh <mame@tsg.ne.jp>
Updated by mame (Yusuke Endoh) almost 2 years ago
Hi, Nobu Are you willing to handle this ticket? If you are, are you willing to fix this issue? If you are, will the fix be included in 1.9.2? -- Yusuke Endoh <mame@tsg.ne.jp>
Updated by mame (Yusuke Endoh) almost 2 years ago
- Target version set to 2.0.0
Hi, I decide this issue as WONTFIX for 1.9.2. As Eric said, do not require "rubygems/specfication" directly. > The workaround is to assume that Gem::Specification is available, because require 'rubygems' provides it instead of requiring 'rubygem/specification'. This issue should be fixed in 1.9.3, by the approach of nobu's patch in #3140. -- Yusuke Endoh <mame@tsg.ne.jp>
Updated by naruse (Yui NARUSE) over 1 year ago
What's going on?
Updated by ko1 (Koichi Sasada) 12 months ago
What's going on? again.
Updated by tenderlovemaking (Aaron Patterson) 12 months ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This seems to be fixed in ruby trunk:
[aaron@higgins ~]$ ruby -v -rrubygems/specification -e' '
ruby 1.9.3dev (2011-06-06 trunk 31944) [x86_64-darwin10.7.0]
[aaron@higgins ~]$