End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.default_dir
default_dir
lib/rubygems/defaults.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/defaults.rb, line 36
def self.default_dir
path = if defined? RUBY_FRAMEWORK_VERSION
[
File.dirname(RbConfig::CONFIG['sitedir']),
'Gems',
RbConfig::CONFIG['ruby_version'],
]
else
[
RbConfig::CONFIG['rubylibprefix'],
'gems',
RbConfig::CONFIG['ruby_version'],
]
end
@default_dir ||= File.join(*path)
end
Default home directory path to be used if an alternate value is not specified in the environment
See also
.default_cert_path
.default_exec_format
.default_bindir
.default_ext_dir_for
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1