Bugs item #26740, was opened at 2009-07-24 07: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: James Tucker (raggi) Date: 2010-07-19 13:34 Message: We should keep a manifest and use that during uninstalls. ---------------------------------------------------------------------- Comment By: Youssef Gaigi (youssefg) Date: 2009-10-09 00:31 Message: Did you figure out a way out of this. I tried to delete rubygems and install again, but still the problem is there. Here's what I get whenever i require rubygems: irb(main):001:0> require 'RubyGems' /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:14: warning: already initialized constant VERSION /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:14: warning: already initialized constant RubyGemsVersion /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:193: warning: already initialized constant MUTEX /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:195: warning: already initialized constant RubyGemsPackageVersion /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:207: warning: already initialized constant WIN_PATTERNS /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:1078: warning: already initialized constant MARSHAL_SPEC_DIR /usr/lib/ruby/site_ruby/1.8/RubyGems.rb:1083: warning: already initialized constant YAML_SPEC_DIR => true I appreciate your help Youssef ---------------------------------------------------------------------- Comment By: John Trupiano (jtrupiano) Date: 2009-09-18 01:53 Message: You have fixed it Chad-- our preinit wasn't enforcing 0.5.3 or greater, and this particular box did not yet have 0.5.3 installed. ---------------------------------------------------------------------- Comment By: Chad Woolley (thewoolleyman) Date: 2009-09-17 21:08 Message: "You know what, I just realized that I was loading geminstaller in the preinitializer, which was in turn loading rubygems_version.rb." I'm sure I fixed this in the latest geminstaller release. Please open a bug if I didn't. ---------------------------------------------------------------------- Comment By: John Trupiano (jtrupiano) Date: 2009-09-17 18:44 Message: Hey Ryan, You know what, I just realized that I was loading geminstaller in the preinitializer, which was in turn loading rubygems_version.rb. As a result, the "require 'rubygems'" call on line 86 of config/boot.rb was actually returning false and consequently not setting the RubyGemsVersion to 1.3.5 appropriately. This explains why I could not reproduce the problem in irb. My apologies for the noise. In any case, manually deleting the file did do the trick. -John ---------------------------------------------------------------------- Comment By: Ryan Davis (zenspider) Date: 2009-09-17 18:23 Message: I just looked at rails 2.3.4 and don't see any place that rubygems_version is being required. The version checking code requires rubygems and then uses RubyGemsVersion. How did you get bit by this bug? ---------------------------------------------------------------------- Comment By: John Trupiano (jtrupiano) Date: 2009-09-17 14: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 20: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 20: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 19: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 19: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