Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Gem.install

install(name, version = Gem::Requirement.default, *options)

Top level install helper method. Allows you to install gems interactively:

% irb
>> Gem.install "minitest"
Fetching: minitest-5.14.0.gem (100%)
=> [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]