ruby/rubygems · error · ProductionError

You are trying to check outdated gems in deployment mode. Ru

Error message

You are trying to check outdated gems in deployment mode. Run `bundle outdated` elsewhere.

If this is a development machine, remove the #{Bundler.default_gemfile} freeze
by running `#{suggested_command}`.

What it means

Error "You are trying to check outdated gems in deployment mode. Run `bundle outdated` elsewhere. If this is a development machine, remove the #{Bundler.default_gemfile} freeze by running `#{suggested_command}`." thrown in ruby/rubygems.

Source

Thrown at lib/bundler/cli/outdated.rb:261

    end

    def cooldown_days_remaining(spec, now = Time.now)
      return nil unless spec.respond_to?(:created_at) && spec.created_at
      return nil unless spec.respond_to?(:remote) && spec.remote
      days = spec.remote.effective_cooldown
      return nil if days.nil? || days <= 0
      remaining = days - ((now - spec.created_at) / 86_400.0)
      remaining > 0 ? remaining.ceil : nil
    end

    def check_for_deployment_mode!
      return unless Bundler.frozen_bundle?
      suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
        "bundle config unset frozen"
      elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
        "bundle config unset deployment"
      end
      raise ProductionError, "You are trying to check outdated gems in " \
        "deployment mode. Run `bundle outdated` elsewhere.\n" \
        "\nIf this is a development machine, remove the " \
        "#{Bundler.default_gemfile} freeze" \
        "\nby running `#{suggested_command}`."
    end

    def update_present_via_semver_portions(current_spec, active_spec, options)
      current_major = current_spec.version.segments.first
      active_major = active_spec.version.segments.first

      update_present = false
      update_present = active_major > current_major if options["filter-major"]

      if !update_present && (options["filter-minor"] || options["filter-patch"]) && current_major == active_major
        current_minor = get_version_semver_portion_value(current_spec, 1)
        active_minor = get_version_semver_portion_value(active_spec, 1)

        update_present = active_minor > current_minor if options["filter-minor"]

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/cli/outdated.rb:261 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/9914a64822e7fcf8. Report an issue: GitHub.