{"record":{"id":"f5ff21caf1407232","repo":"ruby/rubygems","slug":"command-name-class-name-failed-error-messag","errorCode":null,"errorMessage":"#{command_name || class_name} failed#{error.message}","messagePattern":"#(.+?) failed#(.+?)","errorType":"exception","errorClass":"Gem::InstallError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/ext/builder.rb","lineNumber":122,"sourceCode":"      build_env = { \"SOURCE_DATE_EPOCH\" => Gem.source_date_epoch_string }.merge(env)\n      # A single-element command would be parsed as a shell command line,\n      # splitting an unquoted command path containing spaces. Use the\n      # [cmdname, argv0] form to keep exec semantics.\n      command = [[command.first, command.first]] if command.size == 1\n      output, status = begin\n                         Open3.popen2e(build_env, *command, chdir: dir) do |stdin, stdouterr, wait_thread|\n                           stdin.close\n                           output = String.new\n                           while line = stdouterr.gets\n                             output << line\n                             if verbose\n                               print line\n                             end\n                           end\n                           [output, wait_thread.value]\n                         end\n                       rescue StandardError => error\n                         raise Gem::InstallError, \"#{command_name || class_name} failed#{error.message}\"\n                       end\n      unless verbose\n        results << output\n      end\n    ensure\n      ENV[\"RUBYGEMS_GEMDEPS\"] = rubygems_gemdeps\n    end\n\n    unless status.success?\n      results << \"Building has failed. See above output for more information on the failure.\" if verbose\n    end\n\n    yield(status, results) if block_given?\n\n    unless status.success?\n      exit_reason =\n        if status.exited?\n          \", exit code #{status.exitstatus}\"","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/ext/builder.rb#L104-L140","documentation":"Error \"#{command_name || class_name} failed#{error.message}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/ext/builder.rb:122 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"}