Exception: Gem::MissingSpecError
- Defined in:
- lib/rubygems/errors.rb
Overview
Raised when trying to activate a gem, and that gem does not exist on the system. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from LoadError
Instance Method Summary collapse
-
#initialize(name, requirement, extra_message = nil) ⇒ MissingSpecError
constructor
A new instance of MissingSpecError.
-
#message ⇒ Object
:nodoc:.
Constructor Details
#initialize(name, requirement, extra_message = nil) ⇒ MissingSpecError
Returns a new instance of MissingSpecError.
29 30 31 32 33 34 |
# File 'lib/rubygems/errors.rb', line 29 def initialize(name, requirement, =nil) @name = name @requirement = requirement = super() end |
Instance Method Details
#message ⇒ Object
:nodoc:
36 37 38 39 |
# File 'lib/rubygems/errors.rb', line 36 def # :nodoc: + "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information" end |