Raised when trying to activate a gem, and the gem exists on the system, but not the requested version. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError
to catch all types of load errors.
Attributes
Read
No documentation available
Class Methods
lib/rubygems/errors.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rubygems/errors.rb, line 53
def initialize(name, requirement, specs)
super(name, requirement)
@specs = specs
end
No documentation available
Instance Methods
lib/rubygems/errors.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rubygems/errors.rb, line 60
def build_message
if name == "bundler" && message = Gem::BundlerVersionFinder.missing_version_message
return message
end
names = specs.map(&:full_name)
"Could not find '#{name}' (#{requirement}) - did find: [#{names.join ','}]\n"
end
No documentation available