{"record":{"id":"3fb5c843bb7af21b","repo":"ruby/rubygems","slug":"unknown-switches-unknown-map-inspect-join","errorCode":null,"errorMessage":"Unknown switches #{unknown.map(&:inspect).join(', ')}","messagePattern":"Unknown switches #(.+?)","errorType":"validation","errorClass":"InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/cli.rb","lineNumber":87,"sourceCode":"        # lock --lockfile works differently than install --lockfile\n        unless current_cmd == \"lock\"\n          custom_lockfile = options[:lockfile] || ENV[\"BUNDLE_LOCKFILE\"] || Bundler.settings[:lockfile]\n          if custom_lockfile && !custom_lockfile.empty?\n            Bundler::SharedHelpers.set_env \"BUNDLE_LOCKFILE\", File.expand_path(custom_lockfile)\n            reset_settings = true\n          end\n        end\n      end\n\n      Bundler.reset_settings_and_root! if reset_settings\n\n      Bundler.auto_switch\n\n      Bundler.settings.set_command_option_if_given :retry, options[:retry]\n\n      Bundler.auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)\n    rescue UnknownArgumentError => e\n      raise InvalidOption, e.message\n    ensure\n      self.options ||= {}\n      unprinted_warnings = Bundler.ui.unprinted_warnings\n      Bundler.ui = UI::Shell.new(options)\n      Bundler.ui.level = \"debug\" if options[:verbose] || Bundler.settings[:verbose]\n      unprinted_warnings.each {|w| Bundler.ui.warn(w) }\n    end\n\n    check_unknown_options!(except: [:config, :exec])\n    stop_on_unknown_option! :exec\n\n    desc \"cli_help\", \"Prints a summary of bundler commands\", hide: true\n    def cli_help\n      version\n      Bundler.ui.info \"\\n\"\n\n      primary_commands = [\"install\", \"update\", \"cache\", \"exec\", \"config\", \"help\"]\n","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli.rb#L69-L105","documentation":"Error \"Unknown switches #{unknown.map(&:inspect).join(', ')}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli.rb:87 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"}