Installs a gem along with all its dependencies from local and remote gems.
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.
Raised when there are conflicting gem specs loaded
Raised by Gem::Resolver
when a Gem::Dependency::Conflict reaches the toplevel. Indicates which dependencies were incompatible through conflict
and conflicting_dependencies
Raised when attempting to uninstall a gem that isn’t in GEM_HOME.
Raised when removing a gem with the uninstall command fails
Raised by the DependencyInstaller when a specific gem cannot be found
Raised by Gem::Resolver
when dependencies conflict and create the inability to find a valid possible spec for a request.
Signals that a remote operation cannot be conducted, probably due to not being connected (or just not finding host).
Raised when a gem dependencies file specifies a ruby version that does not match the current version.
Raised by Resolver when a dependency requests a gem for which there is no spec.
Top level class for building the gem repository index.
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.
A test case for Gem::Installer
.
This Gem::StreamUI
subclass records input and output to StringIO
for retrieval during tests.