Exception: Omnibus::GemNotInstalled

Inherits:
Error
  • Object
show all
Defined in:
lib/omnibus/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ GemNotInstalled

Returns a new instance of GemNotInstalled.



129
130
131
# File 'lib/omnibus/exceptions.rb', line 129

def initialize(name)
  @name = name
end

Instance Method Details

#to_sObject



133
134
135
136
137
138
139
140
141
# File 'lib/omnibus/exceptions.rb', line 133

def to_s
  <<~EOH
    I could not load the `#{@name}' gem. Please make sure the gem is installed on
    your local system by running `gem install #{@name}`, or by adding the following
    to your Gemfile:

        gem '#{@name}'
  EOH
end