ruby/rubygems · error · Gem::Package::FormatError
#{e.message}
Error message
#{e.message} What it means
Error "#{e.message}" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/package.rb:637
@gem.with_read_io do |io|
Gem::Package::TarReader.new io do |reader|
read_checksums reader
verify_files reader
end
end
verify_checksums @digests, @checksums
@security_policy&.verify_signatures @spec, @digests, @signatures
true
rescue Gem::Security::Exception
@spec = nil
@files = []
raise
rescue Errno::ENOENT => e
raise Gem::Package::FormatError.new e.message
rescue Zlib::GzipFile::Error, EOFError, Gem::Package::TarInvalidError => e
raise Gem::Package::FormatError.new e.message, @gem
end
private
##
# Returns the full path for installing +filename+ into +destination_dir+,
# which must already be resolved with File.realpath by the caller.
#
# If +filename+ is not inside +destination_dir+ an exception is raised.
def install_location(filename, destination_dir) # :nodoc:
raise Gem::Package::PathError.new(filename, destination_dir) if
filename.start_with? "/"
destination = File.expand_path(filename, destination_dir)
View on GitHub (pinned to 86cbb817a3)
Solutions
- Re-download the gem file; it could not be read
- If you built the gem, rebuild it with `gem build foo.gemspec`
When it happens
Trigger: Thrown at lib/rubygems/package.rb:637 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23).
Data as JSON: /api/errors/7d68f9c1b50a4ead.
Report an issue: GitHub.