{"record":{"id":"ae1a9b203bcca8f3","repo":"ruby/rubygems","slug":"15-ae1a9b","errorCode":"15","errorMessage":"You cannot specify `--branch` and `--ref` at the same time.","messagePattern":"You cannot specify `--branch` and `--ref` at the same time\\.","errorType":"exception","errorClass":"Bundler::InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/plugin.rb","lineNumber":49,"sourceCode":"    def reset!\n      instance_variables.each {|i| remove_instance_variable(i) }\n\n      @sources = {}\n      @commands = {}\n      @hooks_by_event = Hash.new {|h, k| h[k] = [] }\n      @loaded_plugin_names = []\n      @index = nil\n    end\n\n    reset!\n\n    # Installs a new plugin by the given name\n    #\n    # @param [Array<String>] names the name of plugin to be installed\n    # @param [Hash] options various parameters as described in description.\n    #               Refer to cli/plugin for available options\n    def install(names, options)\n      raise InvalidOption, \"You cannot specify `--branch` and `--ref` at the same time.\" if options[\"branch\"] && options[\"ref\"]\n\n      specs = Installer.new.install(names, options)\n\n      save_plugins specs.slice(*names)\n    rescue PluginError\n      specs_to_delete = specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }\n      specs_to_delete.each_value {|spec| Bundler.rm_rf(spec.full_gem_path) }\n\n      raise\n    end\n\n    # Uninstalls plugins by the given names\n    #\n    # @param [Array<String>] names the names of plugins to be uninstalled\n    def uninstall(names, options)\n      if names.empty? && !options[:all]\n        Bundler.ui.error \"No plugins to uninstall. Specify at least 1 plugin to uninstall.\\n\"\\\n          \"Use --all option to uninstall all the installed plugins.\"","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/plugin.rb#L31-L67","documentation":"Error \"You cannot specify `--branch` and `--ref` at the same time.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/plugin.rb:49 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"}