Bugs item #27699, was opened at 2010-01-18 18:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=27699&group_id=126
Category: #gem and #require methods >Group: v1.3.x >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Roger Pack (rogerdpack) >Assigned to: Eric Hodel (drbrain) Summary: possible to require the wrong version Initial Comment: Currently this code fails (install test-unit gem v 2.0.6 and 1.2.3 first). gem 'rails', '= 2.3.5' $LOAD_PATH.uniq! # active_support (?) does this internally all the time # now attempt to load a gem: gem 'test-unit', '= 1.2.3' require 'test/unit/version' puts Test::Unit::VERSION # should be 1.2.3, but is 2.0.6 This reason for this is that $LOAD_PATH.uniq! is throwing out the "marker" path that has :@gem_prelude_index set, thus it is placing new gems at the end of the $LOAD_PATH, which causes it to always use the highest version of gems. So my question is...is this a bug of rubygems (it should set :@gem_prelude_index on every path it every loads ever) or is rails in error? Thanks. -r refs: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/4dad285825c52532 http://groups.google.com/group/rspec/browse_thread/thread/c5ba2311ca2b7d93# ---------------------------------------------------------------------- >Comment By: Eric Hodel (drbrain) Date: 2010-02-06 17:36 Message: activesupport needs to take more care of what it adds to $LOAD_PATH so it doesn't need to #uniq! it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=27699&group_id=126 _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems [email protected] http://rubyforge.org/mailman/listinfo/rubygems-developers
