{"record":{"id":"364b1c17024a149e","repo":"ruby/rubygems","slug":"15","errorCode":"15","errorMessage":"You passed #{invalid_keys} as options for #{command}, but they are invalid. Valid options are: #{valid_keys}. You may be able to resolve this by upgrading Bundler to the newest version.","messagePattern":"You passed #(.+?) as options for #(.+?), but they are invalid\\. Valid options are: #(.+?)\\. You may be able to resolve this by upgrading Bundler to the newest version\\.","errorType":"validation","errorClass":"InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/dsl.rb","lineNumber":562,"sourceCode":"    def validate_keys(command, opts, valid_keys)\n      if opts[\"branch\"] && !(opts[\"git\"] || opts[\"github\"] || (opts.keys & @git_sources.keys.map(&:to_s)).any?)\n        raise GemfileError, %(The `branch` option for `#{command}` is not allowed. Only gems with a git source can specify a branch)\n      end\n\n      invalid_keys = opts.keys - valid_keys\n      return true unless invalid_keys.any?\n\n      message = String.new\n      message << \"You passed #{invalid_keys.map {|k| \":\" + k }.join(\", \")} \"\n      message << if invalid_keys.size > 1\n        \"as options for #{command}, but they are invalid.\"\n      else\n        \"as an option for #{command}, but it is invalid.\"\n      end\n\n      message << \" Valid options are: #{valid_keys.join(\", \")}.\"\n      message << \" You may be able to resolve this by upgrading Bundler to the newest version.\"\n      raise InvalidOption, message\n    end\n\n    def normalize_source(source)\n      case source\n      when :gemcutter, :rubygems, :rubyforge\n        removed_message =\n          \"The source :#{source} is disallowed because HTTP requests are insecure.\\n\" \\\n          \"Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.\"\n        Bundler::SharedHelpers.feature_removed! removed_message\n      when String\n        source\n      else\n        raise GemfileError, \"Unknown source '#{source}'\"\n      end\n    end\n\n    def check_path_source_safety\n      return if @sources.global_path_source.nil?","sourceCodeStart":544,"sourceCodeEnd":580,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/dsl.rb#L544-L580","documentation":"Error \"You passed #{invalid_keys} as options for #{command}, but they are invalid. Valid options are: #{valid_keys}. You may be able to resolve this by upgrading Bundler to the newest version.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/dsl.rb:562 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"}