Kurt StephensNerd Up! | ||
|
Kurt on Wed, 2007-10-17 14:37.
Gem::SourceIndex does not honor GEM_PATH ordering. See: http://rubyforge.org/tracker/index.php?func=detail&aid=14816&group_id=12... Gem::SourceIndex#load_gems_in calls #add_spec for all gems found in #spec_dirs, in the order of Gem.path, however #add_spec
# Add a gem specification to the source index.
def add_spec(gem_spec)
@gems[gem_spec.full_name] = gem_spec
end
Thus: if a gem xyz-1.2.3 exists in multiple gems install directories along Gem.path, the last one found in the Gem.path I think this would fix it:
# Add a gem specification to the source index.
def add_spec(gem_spec, overwrite = false)
@gems[gem_spec.full_name] = nil if overwrite
@gems[gem_spec.full_name] ||= gem_spec
end
If other callers to #add_spec need to overwrite, they could call #add_spec(gem_spec, true) or some variant. This was causing problems with gems that were corrupted further in the Gem.path (e.g.: /usr/lib/ruby by an errant superuser), Reply |
||
Recent comments
3 weeks 21 hours ago
7 weeks 3 days ago
17 weeks 3 days ago
19 weeks 1 hour ago
21 weeks 2 days ago
21 weeks 2 days ago
24 weeks 4 days ago
24 weeks 4 days ago
26 weeks 3 days ago
27 weeks 1 hour ago