End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.datadir
datadir(gem_name)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems.rb, line 359
def self.datadir(gem_name)
spec = @loaded_specs[gem_name]
return nil if spec.nil?
spec.datadir
end
The path to the data directory specified by the gem name. If the package is not available as a gem, return nil.