{"record":{"id":"9914a64822e7fcf8","repo":"ruby/rubygems","slug":"you-are-trying-to-check-outdated-gems-in-deploymen","errorCode":null,"errorMessage":"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}`.","messagePattern":"You are trying to check outdated gems in deployment mode\\. Run `bundle outdated` elsewhere\\.\n\nIf this is a development machine, remove the #(.+?) freeze\nby running `#(.+?)`\\.","errorType":"exception","errorClass":"ProductionError","httpStatus":null,"severity":"error","filePath":"lib/bundler/cli/outdated.rb","lineNumber":261,"sourceCode":"    end\n\n    def cooldown_days_remaining(spec, now = Time.now)\n      return nil unless spec.respond_to?(:created_at) && spec.created_at\n      return nil unless spec.respond_to?(:remote) && spec.remote\n      days = spec.remote.effective_cooldown\n      return nil if days.nil? || days <= 0\n      remaining = days - ((now - spec.created_at) / 86_400.0)\n      remaining > 0 ? remaining.ceil : nil\n    end\n\n    def check_for_deployment_mode!\n      return unless Bundler.frozen_bundle?\n      suggested_command = if Bundler.settings.locations(\"frozen\").keys.&([:global, :local]).any?\n        \"bundle config unset frozen\"\n      elsif Bundler.settings.locations(\"deployment\").keys.&([:global, :local]).any?\n        \"bundle config unset deployment\"\n      end\n      raise ProductionError, \"You are trying to check outdated gems in \" \\\n        \"deployment mode. Run `bundle outdated` elsewhere.\\n\" \\\n        \"\\nIf this is a development machine, remove the \" \\\n        \"#{Bundler.default_gemfile} freeze\" \\\n        \"\\nby running `#{suggested_command}`.\"\n    end\n\n    def update_present_via_semver_portions(current_spec, active_spec, options)\n      current_major = current_spec.version.segments.first\n      active_major = active_spec.version.segments.first\n\n      update_present = false\n      update_present = active_major > current_major if options[\"filter-major\"]\n\n      if !update_present && (options[\"filter-minor\"] || options[\"filter-patch\"]) && current_major == active_major\n        current_minor = get_version_semver_portion_value(current_spec, 1)\n        active_minor = get_version_semver_portion_value(active_spec, 1)\n\n        update_present = active_minor > current_minor if options[\"filter-minor\"]","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli/outdated.rb#L243-L279","documentation":"Error \"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}`.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli/outdated.rb:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}