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.
# File lib/rubygems.rb, line 743
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) then
prefix
end
end