End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.prefix
prefix
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems.rb, line 761
def self.prefix
prefix = File.dirname RUBYGEMS_DIR
if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
'lib' == File.basename(RUBYGEMS_DIR)
prefix
end
end
The directory prefix this RubyGems was installed at. If your prefix is in a standard location (ie, rubygems is installed where you’d expect it to be), then prefix returns nil.
See also
.post_uninstall
.pre_install
.post_reset
.pre_reset
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1