ruby/rubygems · error · Gem::SafeMarshal::Reader::NotImplementedError

Reading Marshal objects of type class is not implemented

Error message

Reading Marshal objects of type class is not implemented

What it means

Error "Reading Marshal objects of type class is not implemented" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/safe_marshal/reader.rb:274

      end

      def read_float
        string = read_bytes(read_integer)
        Elements::Float.new(string)
      end

      def read_bignum
        sign = read_byte
        data = read_bytes(read_integer * 2)
        Elements::Bignum.new(sign, data)
      end

      def read_extended_object
        raise NotImplementedError, "Reading Marshal objects of type extended_object is not implemented"
      end

      def read_class
        raise NotImplementedError, "Reading Marshal objects of type class is not implemented"
      end

      def read_module
        raise NotImplementedError, "Reading Marshal objects of type module is not implemented"
      end

      def read_class_or_module
        raise NotImplementedError, "Reading Marshal objects of type class_or_module is not implemented"
      end

      def read_data
        raise NotImplementedError, "Reading Marshal objects of type data is not implemented"
      end

      def read_regexp
        raise NotImplementedError, "Reading Marshal objects of type regexp is not implemented"
      end

View on GitHub (pinned to 86cbb817a3)

Solutions

  1. The gem metadata uses a Marshal construct RubyGems does not support; rebuild the gem with a current RubyGems

When it happens

Trigger: Thrown at lib/rubygems/safe_marshal/reader.rb:274 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/b657a894f9a5c9ad. Report an issue: GitHub.