{"record":{"id":"7531e5d3af38cea9","repo":"ruby/rubygems","slug":"unable-to-remove-the-platform-platform-since","errorCode":null,"errorMessage":"Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join \", \"}","messagePattern":"Unable to remove the platform `#(.+?)` since the only platforms are #(.+?)","errorType":"exception","errorClass":"InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/definition.rb","lineNumber":546,"sourceCode":"        \"but your local platform is #{Bundler.local_platform}. \" \\\n        \"Add the current platform to the lockfile with\\n`bundle lock --add-platform #{Bundler.local_platform}` and try again.\"\n    end\n\n    def normalize_platforms\n      resolve.normalize_platforms!(current_dependencies, platforms)\n\n      @resolve = SpecSet.new(resolve.for(current_dependencies, @platforms))\n    end\n\n    def add_platform(platform)\n      return if @platforms.include?(platform)\n\n      @new_platforms << platform\n      @platforms << platform\n    end\n\n    def remove_platform(platform)\n      raise InvalidOption, \"Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join \", \"}\" unless @platforms.include?(platform)\n\n      @removed_platforms << platform\n      @platforms.delete(platform)\n    end\n\n    def nothing_changed?\n      !something_changed?\n    end\n\n    def no_resolve_needed?\n      !resolve_needed?\n    end\n\n    def unlocking?\n      @unlocking\n    end\n\n    def add_checksums","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/definition.rb#L528-L564","documentation":"Error \"Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join \", \"}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/definition.rb:546 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"}