Exception: Gem::UnsatisfiableDependencyError
- Inherits:
 - 
      DependencyError
      
        
- Object
 - RuntimeError
 - Exception
 - DependencyError
 - Gem::UnsatisfiableDependencyError
 
 
- Defined in:
 - lib/rubygems/exceptions.rb
 
Overview
Raised by Resolver when a dependency requests a gem for which there is no spec.
Instance Attribute Summary collapse
- 
  
    
      #dependency  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The unsatisfiable dependency.
 - 
  
    
      #errors  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Errors encountered which may have contributed to this exception.
 
Instance Method Summary collapse
- 
  
    
      #initialize(dep, platform_mismatch = nil)  ⇒ UnsatisfiableDependencyError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Creates a new UnsatisfiableDependencyError for the unsatisfiable Gem::Resolver::DependencyRequest
dep. - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The name of the unresolved dependency.
 - 
  
    
      #version  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The Requirement of the unresolved dependency (not Version).
 
Constructor Details
#initialize(dep, platform_mismatch = nil) ⇒ UnsatisfiableDependencyError
Creates a new UnsatisfiableDependencyError for the unsatisfiable Gem::Resolver::DependencyRequest dep
      256 257 258 259 260 261 262 263 264 265 266 267 268 269 270  | 
    
      # File 'lib/rubygems/exceptions.rb', line 256 def initialize(dep, platform_mismatch=nil) if platform_mismatch && !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 @errors = [] end  | 
  
Instance Attribute Details
#dependency ⇒ Object (readonly)
The unsatisfiable dependency. This is a Gem::Resolver::DependencyRequest, not a Gem::Dependency
      245 246 247  | 
    
      # File 'lib/rubygems/exceptions.rb', line 245 def dependency @dependency end  | 
  
#errors ⇒ Object
Errors encountered which may have contributed to this exception
      250 251 252  | 
    
      # File 'lib/rubygems/exceptions.rb', line 250 def errors @errors end  | 
  
Instance Method Details
#name ⇒ Object
The name of the unresolved dependency
      275 276 277  | 
    
      # File 'lib/rubygems/exceptions.rb', line 275 def name @dependency.name end  | 
  
#version ⇒ Object
The Requirement of the unresolved dependency (not Version).
      282 283 284  | 
    
      # File 'lib/rubygems/exceptions.rb', line 282 def version @dependency.requirement end  |