Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.default_path
() -> ::Array[::String]
default_path
lib/rubygems/defaults.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/defaults.rb, line 184
def self.default_path
path = []
path << user_dir if user_home && File.exist?(user_home)
path << default_dir
path << vendor_dir if vendor_dir && File.directory?(vendor_dir)
path
end
Default gem load path
See also
.default_key_path
.default_rubygems_dirs
.default_gem_load_paths
.default_sources
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0