class Bundler::Resolver
def verify_gemfile_dependencies_are_found!(requirements)
def verify_gemfile_dependencies_are_found!(requirements) requirements.each do |requirement| next if requirement.name == "bundler" next unless search_for(requirement).empty? if (base = @base[requirement.name]) && !base.empty? version = base.first.version message = "You have requested:\n" \ " #{requirement.name} #{requirement.requirement}\n\n" \ "The bundle currently has #{requirement.name} locked at #{version}.\n" \ "Try running `bundle update #{requirement.name}`\n\n" \ "If you are updating multiple gems in your Gemfile at once,\n" \ "try passing them all to `bundle update`" elsif requirement.source name = requirement.name versions = @source_requirements[name][name].map(&:version) message = "Could not find gem '#{requirement}' in #{requirement.source}.\n" if versions.any? message << "Source contains '#{name}' at: #{versions.join(", ")}" else message << "Source does not contain any versions of '#{requirement}'" end else message = "Could not find gem '#{requirement}' in any of the gem sources " \ "listed in your Gemfile or available on this machine." end raise GemNotFound, message end end