Bugs item #26740, was opened at 2009-07-24 03:44
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26740&group_id=126

Category: None
Group: None
Status: Open
Resolution: Rejected
Priority: 3
Submitted By: Chad Woolley (thewoolleyman)
Assigned to: Nobody (None)
Summary: outdated rubygems/rubygems_version.rb still exists on Leopard default 
ruby install even though it was removed in 1.3.5

Initial Comment:
Does system installer not delete old files?  If someone happens to load this 
file, they get a warning, then get the wrong version.

Can't we just move the version back into this file and avoid the issue 
altogether?

chadmac:1.8 woolley$ pwd
/Library/Ruby/Site/1.8
chadmac:1.8 woolley$ grep RubyGemsVersion rubygems.rb 
  RubyGemsVersion = VERSION = '1.3.5'
chadmac:1.8 woolley$ ls rubygems/rubygems_version.rb 
rubygems/rubygems_version.rb


chadmac:~ woolley$ irb
>> Gem::RubyGemsVersion
=> "1.3.5"
>> require 'rubygems/rubygems_version'
/Library/Ruby/Site/1.8/rubygems/rubygems_version.rb:12: warning: already 
initialized constant RubyGemsVersion
/Library/Ruby/Site/1.8/rubygems/rubygems_version.rb:17: warning: already 
initialized constant VERSION
=> true
>> Gem::RubyGemsVersion
=> "1.3.4"


chadmac:~ woolley$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/woolley/.gem/ruby/1.8
     - 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org";, "http://gems.github.com";]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
     - http://gems.github.com




----------------------------------------------------------------------

Comment By: John Trupiano (jtrupiano)
Date: 2009-09-17 10:55

Message:
I just want to point out that this exact bug bit us pretty badly again.  The 
scenario is this (and I'm surprised it hasn't happened more frequently):

We're running a rails 2.3.4 app.  The rails 2.3.x branch requires rubygems 
1.3.2 or greater.

On this particular OSX machine, we jumped from RubyGems 1.3.1 directly to 
1.3.5.  As a result, this left the rubygems_version.rb file specifying version 
1.3.1.  As a result, we could never actually run the rails app because of the 
version checking code in config/boot.rb.

It took us quite awhile to track down what the issue really was.  Others not so 
in tune with RubyGems development are surely to lose a whole lot more time than 
we did.

----------------------------------------------------------------------

Comment By: Chad Woolley (thewoolleyman)
Date: 2009-07-24 16:53

Message:
Agreed, a very low priority.  I was only requiring explicitly as a side effect 
of my regression tests - normally you should rely on rubygems to require what 
it needs.

However, this should probably get turned into a bug with the system install 
command, because it isn't deleting old files.  This could come back to bite us 
in a more serious way in the future.

----------------------------------------------------------------------

Comment By: John Trupiano (jtrupiano)
Date: 2009-07-24 16:51

Message:
I can confirm the odd behavior on a default Leopard install:

john-mbp:1.8 john$ irb
irb(main):001:0> Gem::RubyGemsVersion
=> "1.3.5"
irb(main):002:0> require 'rubygems/rubygems_version'
/Library/Ruby/Site/1.8/rubygems/rubygems_version.rb:12: warning: already 
initialized constant RubyGemsVersion
/Library/Ruby/Site/1.8/rubygems/rubygems_version.rb:17: warning: already 
initialized constant VERSION
=> true
irb(main):003:0> Gem::RubyGemsVersion
=> "1.3.4"

-John

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2009-07-24 15:16

Message:
I agree, the rubygems_version.rb file should be deleted on update if possible. 
Mind you, I've never heard of anyone explicitly require'ing that file, so it 
strikes me as a very low priority item, but it's still something we could fix.

Regards,

Dan

----------------------------------------------------------------------

Comment By: Chad Woolley (thewoolleyman)
Date: 2009-07-24 15:01

Message:
Rejected with no comment, huh?  Classy.

You ignore the fact that there are actual bugs:  

* RubyGems 1.3.5 introduced an obsolete file on the Leopard distribution
* This file contains an outdated and conflicting RubyGems version number
* If any existing rubygems API clients happen to still load this file, they 
will get a warning, and rubygems will subsequently report the incorrect and 
outdated version.
* There is a bug with the system update command that does not delete old files, 
at least on the default Leopard install.


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26740&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to