Skip to content
On this page

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

class · Ruby 3.0

Gem::Installer

< Object include Gem::InstallerUninstallerUtils include Gem::UserInteraction 30 instance methods 5 class methods

The installer installs the files contained in the .gem into the Gem.home.

Gem::Installer does the work of putting files in all the right places on the filesystem including unpacking the gem into its gem dir, installing the gemspec in the specifications dir, storing the cached gem in the cache dir, and installing either wrappers or symlinks for executables.

The installer invokes pre and post install hooks. Hooks can be added either through a rubygems_plugin.rb file in an installed gem or via a rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb file. See Gem.pre_install and Gem.post_install for details.

Class methods 5

Instance methods 30

Constants

Paths where env(1) might live. Some systems are broken and have it in /bin

Deprecated in favor of Gem::Ext::BuildError

Attributes
Read

The directory a gem’s executables will be installed into

Write

Overrides the executable format.

This is a sprintf format with a “%s” which will be replaced with the executable name. It is based off the ruby executable name’s difference from “ruby”.

Read

The gem repository the gem will be installed into

Read

The options passed when the Gem::Installer was instantiated.

Read

The gem package instance.

Read & Write

True if we’ve warned about PATH not including Gem.bindir