In Files

  • rubygems/exceptions.rb

Methods

Class/Module Index [+]

Quicksearch

Gem::UnsatisfiableDependencyError

Raised by Resolver when a dependency requests a gem for which there is no spec.

Attributes

dependency[R]

The unsatisfiable dependency. This is a Gem::Resolver::DependencyRequest, not a Gem::Dependency

Public Class Methods

new(dep, platform_mismatch=nil) click to toggle source

Creates a new UnsatisfiableDependencyError for the unsatisfiable Gem::Resolver::DependencyRequest dep

 
               # File rubygems/exceptions.rb, line 229
def initialize dep, platform_mismatch=nil
  if platform_mismatch and !platform_mismatch.empty?
    plats = platform_mismatch.map { |x| x.platform.to_s }.sort.uniq
    super "Unable to resolve dependency: No match for '#{dep}' on this platform. Found: #{plats.join(', ')}"
  else
    if dep.explicit?
      super "Unable to resolve dependency: user requested '#{dep}'"
    else
      super "Unable to resolve dependency: '#{dep.request_context}' requires '#{dep}'"
    end
  end

  @dependency = dep
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus