Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::Commands::ExecCommand#execute
execute
lib/rubygems/commands/exec_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems/commands/exec_command.rb, line 59
def execute
gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(File::PATH_SEPARATOR), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }.compact
check_executable
print_command
if options[:gem_name] == "gem" && options[:executable] == "gem"
set_gem_exec_install_paths
Gem::GemRunner.new.run options[:args]
return
elsif options[:conservative]
install_if_needed
else
install
activate!
end
load!
ensure
ENV.update(gem_paths) if gem_paths
Gem.clear_paths
end
No documentation available