class Gem::MissingSpecError
superclass Gem::LoadError to catch all types of load errors.
system. Instead of rescuing from this class, make sure to rescue from the
Raised when trying to activate a gem, and that gem does not exist on the
#
def build_message
def build_message total = Gem::Specification.stubs.size "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n" end
def initialize(name, requirement, extra_message=nil)
def initialize(name, requirement, extra_message=nil) @name = name @requirement = requirement @extra_message = extra_message end
def message # :nodoc:
def message # :nodoc: build_message + "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information" end