Permalink
Browse files

older rubygems (< 1.8) require loaded_from to be set

  • Loading branch information...
1 parent 58a0b90 commit aaaa11ddc25c0c1f81711657f1d2dbc1dfcbc9d0 @hone hone committed Sep 11, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/bundler/spec_set.rb
@@ -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

0 comments on commit aaaa11d

Please sign in to comment.