mongodb/mongoid · error · ArgumentError

Version no longer supported: #{version}

Error message

Version no longer supported: #{version}

What it means

Error "Version no longer supported: #{version}" thrown in mongodb/mongoid.

Source

Thrown at lib/mongoid/config/defaults.rb:17

# frozen_string_literal: true

module Mongoid
  module Config
    # Encapsulates logic for loading defaults.
    module Defaults
      # Load the defaults for the feature flags in the given Mongoid version.
      # Note that this method will load the *new* functionality introduced in
      # the given Mongoid version.
      #
      # @param [ String | Float ] version The version number as X.y.
      #
      # raises [ ArgumentError ] if an invalid version is given.
      def load_defaults(version)
        case version.to_s
        when /^[0-7]\./
          raise ArgumentError, "Version no longer supported: #{version}"

        when '8.0'
          self.legacy_readonly = true

          load_defaults '8.1'

        when '8.1'
          self.immutable_ids = false
          self.legacy_persistence_context_behavior = true
          self.around_callbacks_for_embeds = true
          self.prevent_multiple_calls_of_embedded_callbacks = false

          load_defaults '9.0'

        when '9.0'
          self.allow_reparenting_via_nested_attributes = true
          self.autosave_saves_unchanged_documents = true

View on GitHub (pinned to 0da0e23d71)

When it happens

Trigger: Thrown at lib/mongoid/config/defaults.rb:17 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mongodb/mongoid@0da0e23d71 (2026-08-23). Data as JSON: /api/errors/7731ce21713e3d2d. Report an issue: GitHub.