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::DependencyInstaller.new

new(options = {})

Creates a new installer instance.

Options are:

:cache_dir

Alternate repository path to store .gem files in.

:domain

:local, :remote, or :both. :local only searches gems in the current directory. :remote searches only gems in Gem::sources. :both searches both.

:env_shebang

See Gem::Installer::new.

:force

See Gem::Installer#install.

:format_executable

See Gem::Installer#initialize.

:ignore_dependencies

Don’t install any dependencies.

:install_dir

See Gem::Installer#install.

:prerelease

Allow prerelease versions. See install.

:security_policy

See Gem::Installer::new and Gem::Security.

:user_install

See Gem::Installer.new

:wrappers

See Gem::Installer::new

:build_args

See Gem::Installer::new

See also #consider_local? #consider_remote? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0