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 = {})
lib/rubygems/dependency_installer.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/dependency_installer.rb, line 67
def initialize(options = {})
@only_install_dir = !!options[:install_dir]
@install_dir = options[:install_dir] || Gem.dir
@build_root = options[:build_root]
options = DEFAULT_OPTIONS.merge options
@bin_dir = options[:bin_dir]
@dev_shallow = options[:dev_shallow]
@development = options[:development]
@document = options[:document]
@domain = options[:domain]
@env_shebang = options[:env_shebang]
@force = options[:force]
@format_executable = options[:format_executable]
@ignore_dependencies = options[:ignore_dependencies]
@prerelease = options[:prerelease]
@security_policy = options[:security_policy]
@user_install = options[:user_install]
@wrappers = options[:wrappers]
@build_args = options[:build_args]
@build_docs_in_background = options[:build_docs_in_background]
@install_as_default = options[:install_as_default]
@dir_mode = options[:dir_mode]
@data_mode = options[:data_mode]
@prog_mode = options[:prog_mode]
# Indicates that we should not try to update any deps unless
# we absolutely must.
@minimal_deps = options[:minimal_deps]
@available = nil
@installed_gems = []
@toplevel_specs = nil
@cache_dir = options[:cache_dir] || @install_dir
@errors = []
end
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
- :format_executable
-
See Gem::Installer#initialize.
- :ignore_dependencies
-
Don’t install any dependencies.
- :install_dir
- :prerelease
-
Allow prerelease versions. See
install. - :security_policy
-
See
Gem::Installer::newandGem::Security. - :user_install
- :wrappers
- :build_args