{"record":{"id":"3310cde34ba9d284","repo":"ruby/rubygems","slug":"11","errorCode":"11","errorMessage":"Cannot use local override for #{name} at #{path} because :branch is not specified in Gemfile. Specify a branch or run `bundle config unset local.#{override_for(original_path)}` to remove the local override","messagePattern":"Cannot use local override for #(.+?) at #(.+?) because :branch is not specified in Gemfile\\. Specify a branch or run `bundle config unset local\\.#(.+?)` to remove the local override","errorType":"exception","errorClass":"Bundler::GitError","httpStatus":null,"severity":"error","filePath":"lib/bundler/source/git.rb","lineNumber":157,"sourceCode":"        \"#{base_name}-#{shortref_for_path(revision)}\"\n      end\n\n      def unlock!\n        git_proxy.revision = nil\n        options[\"revision\"] = nil\n\n        @unlocked = true\n      end\n\n      def local_override!(path)\n        return false if local?\n\n        original_path = path\n        path = Pathname.new(path)\n        path = path.expand_path(Bundler.root) unless path.relative?\n\n        unless branch || Bundler.settings[:disable_local_branch_check]\n          raise GitError, \"Cannot use local override for #{name} at #{path} because \" \\\n            \":branch is not specified in Gemfile. Specify a branch or run \" \\\n            \"`bundle config unset local.#{override_for(original_path)}` to remove the local override\"\n        end\n\n        unless path.exist?\n          raise GitError, \"Cannot use local override for #{name} because #{path} \" \\\n            \"does not exist. Run `bundle config unset local.#{override_for(original_path)}` to remove the local override\"\n        end\n\n        @local = true\n        set_paths!(path)\n\n        # Create a new git proxy without the cached revision\n        # so the Gemfile.lock always picks up the new revision.\n        @git_proxy = GitProxy.new(path, uri, options)\n\n        if current_branch != branch && !Bundler.settings[:disable_local_branch_check]\n          raise GitError, \"Local override for #{name} at #{path} is using branch \" \\","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/source/git.rb#L139-L175","documentation":"Error \"Cannot use local override for #{name} at #{path} because :branch is not specified in Gemfile. Specify a branch or run `bundle config unset local.#{override_for(original_path)}` to remove the local override\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/source/git.rb:157 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"}