{"record":{"id":"2f7b8a6dcebba3a2","repo":"ruby/rubygems","slug":"cannot-pristine-gem-name-gem-is-sourced-from-l","errorCode":null,"errorMessage":"Cannot pristine #{gem_name}. Gem is sourced from local path.","messagePattern":"Cannot pristine #(.+?)\\. Gem is sourced from local path\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/bundler/cli/pristine.rb","lineNumber":49,"sourceCode":"\n            FileUtils.rm_rf spec.full_gem_path\n          when Source::Git\n            if source.local?\n              Bundler.ui.warn(\"Cannot pristine #{gem_name}. Gem is locally overridden.\")\n              next\n            end\n\n            source.remote!\n            if extension_cache_path = source.extension_cache_path(spec)\n              FileUtils.rm_rf extension_cache_path\n            end\n            FileUtils.rm_rf spec.extension_dir\n            FileUtils.rm_rf spec.full_gem_path\n\n            next if git_sources.include?(source)\n            git_sources << source\n          else\n            Bundler.ui.warn(\"Cannot pristine #{gem_name}. Gem is sourced from local path.\")\n            next\n          end\n\n          true\n        end.map(&:name)\n\n        jobs = Bundler.settings.installation_parallelization\n        pristine_count = definition.specs.count - installed_specs.count\n        # allow a pristining a single gem to skip the parallel worker\n        jobs = [jobs, pristine_count].min\n        ParallelInstaller.call(installer, definition.specs, jobs, false, true, skip: installed_specs)\n      end\n    end\n  end\nend\n","sourceCodeStart":31,"sourceCodeEnd":65,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli/pristine.rb#L31-L65","documentation":"Error \"Cannot pristine #{gem_name}. Gem is sourced from local path.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli/pristine.rb:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pristine does not apply to path gems; cd into the gem's path and reinstall/rebuild it there"],"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"}