class Bundler::Resolver
def self.resolve(requirements, index, source_requirements = {})
==== Returns
*dependencies
==== Parameters
causing any gem activation errors.
the list of passed dependencies and any child dependencies without
Figures out the best possible configuration of gems that satisfies
def self.resolve(requirements, index, source_requirements = {}) resolver = new(index, source_requirements) result = catch(:success) do resolver.resolve(requirements, {}) output = resolver.errors.inject("") do |o, (conflict, (origin, requirement))| if origin o << " Conflict on: #{conflict.inspect}:\n" o << " * #{conflict} (#{origin.version}) activated by #{origin.required_by.first}\n" o << " * #{requirement} required" if requirement.required_by.first o << " by #{requirement.required_by.first}\n" else o << " in Gemfile\n" end else o << " #{requirement} not found in any of the sources\n" o << " required by #{requirement.required_by.first}\n" end o << " All possible versions of origin requirements conflict." end raise VersionConflict, "No compatible versions could be found for required dependencies:\n #{output}" nil end SpecSet.new(result.values) end