End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Commands::SetupCommand#generate_default_dirs
generate_default_dirs
lib/rubygems/commands/setup_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/commands/setup_command.rb, line 460
def generate_default_dirs
prefix = options[:prefix]
site_or_vendor = options[:site_or_vendor]
if prefix.empty?
lib_dir = RbConfig::CONFIG[site_or_vendor]
bin_dir = RbConfig::CONFIG['bindir']
else
# Apple installed RubyGems into libdir, and RubyGems <= 1.1.0 gets
# confused about installation location, so switch back to
# sitelibdir/vendorlibdir.
if defined?(APPLE_GEM_HOME) and
# just in case Apple and RubyGems don't get this patched up proper.
(prefix == RbConfig::CONFIG['libdir'] or
# this one is important
prefix == File.join(RbConfig::CONFIG['libdir'], 'ruby'))
lib_dir = RbConfig::CONFIG[site_or_vendor]
bin_dir = RbConfig::CONFIG['bindir']
else
lib_dir = File.join prefix, 'lib'
bin_dir = File.join prefix, 'bin'
end
end
[prepend_destdir_if_present(lib_dir), prepend_destdir_if_present(bin_dir)]
end
No documentation available
See also
#files_in
#generate_default_man_dir
#execute
#install_default_bundler_gem
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1