class Bundler::Source::Rubygems

def cached_gem(spec)

def cached_gem(spec)
  possibilities = @caches.map { |p| "#{p}/#{spec.file_name}" }
  cached_gem = possibilities.find { |p| File.exist?(p) }
  unless cached_gem
    raise Bundler::GemNotFound, "Could not find #{spec.file_name} for installation"
  end
  cached_gem
end