Skip to content

Commit

Permalink
older rubygems (< 1.8) require loaded_from to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Sep 11, 2012
1 parent 58a0b90 commit aaaa11d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/bundler/spec_set.rb
Expand Up @@ -88,10 +88,11 @@ def materialize(deps, missing_specs = nil, fetch = false)
missing_specs << s unless spec
else
if fetch && s.source.is_a?(Bundler::Source::Rubygems) && spec.nil?
source = s.source.remotes.first
fetcher = Bundler::Fetcher.new(source)
spec = RemoteSpecification.new(s.name, s.version, s.platform, fetcher)
spec.source = source
source = s.source.remotes.first
fetcher = Bundler::Fetcher.new(source)
spec = RemoteSpecification.new(s.name, s.version, s.platform, fetcher)
spec.source = source
spec.loaded_from = "#{Bundler.rubygems.gem_dir}/specifications/#{spec.full_name}.gemspec"
end
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
end
Expand Down

0 comments on commit aaaa11d

Please sign in to comment.