ruby/rubygems · error · MarshalError
#{e.class}: #{e.message}
Error message
#{e.class}: #{e.message} What it means
Error "#{e.class}: #{e.message}" thrown in ruby/rubygems.
Source
Thrown at lib/bundler.rb:513
extensions = [RbConfig::CONFIG["EXEEXT"]] unless extensions&.any?
candidates = extensions.map {|ext| "#{path}#{ext}" }
candidates.find {|candidate| File.file?(candidate) && File.executable?(candidate) }
end
def read_file(file)
SharedHelpers.filesystem_access(file, :read) do
File.open(file, "r:UTF-8", &:read)
end
end
def safe_load_marshal(data)
if Gem.respond_to?(:load_safe_marshal)
Gem.load_safe_marshal
begin
Gem::SafeMarshal.safe_load(data)
rescue Gem::SafeMarshal::Reader::Error, Gem::SafeMarshal::Visitors::ToRuby::Error => e
raise MarshalError, "#{e.class}: #{e.message}"
end
else
load_marshal(data, marshal_proc: SafeMarshal.proc)
end
end
def load_gemspec(file, validate = false)
@gemspec_cache ||= {}
key = File.expand_path(file)
@gemspec_cache[key] ||= load_gemspec_uncached(file, validate)
# Protect against caching side-effected gemspecs by returning a
# new instance each time.
@gemspec_cache[key]&.dup
end
def load_gemspec_uncached(file, validate = false)
path = Pathname.new(file)
contents = read_file(file)View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler.rb:513 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/4519571f36e6beb8.
Report an issue: GitHub.