ruby/rubygems · error · Gem::Package::TarInvalidError
#{str.inspect} is not an octal string
Error message
#{str.inspect} is not an octal string What it means
Error "#{str.inspect} is not an octal string" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/package/tar_reader.rb:62
##
# Close the tar file
def close
end
##
# Iterates over files in the tarball yielding each entry
def each
return enum_for __method__ unless block_given?
until @io.eof? do
begin
header = Gem::Package::TarHeader.from @io
rescue ArgumentError => e
# Specialize only exceptions from Gem::Package::TarHeader.strict_oct
raise e unless e.message.match?(/ is not an octal string$/)
raise Gem::Package::TarInvalidError, e.message
end
return if header.empty?
entry = Gem::Package::TarReader::Entry.new header, @io
yield entry
entry.close
end
end
alias_method :each_entry, :each
##
# NOTE: Do not call #rewind during #each
def rewind
if @init_pos == 0
@io.rewind
elseView on GitHub (pinned to 86cbb817a3)
Solutions
- The tar archive is corrupt (a numeric header field is not octal); re-download the gem
- Rebuild the gem if you created it
When it happens
Trigger: Thrown at lib/rubygems/package/tar_reader.rb:62 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/b5a2207954d362ba.
Report an issue: GitHub.