{"record":{"id":"5efb1d74c746717f","repo":"ruby/rubygems","slug":"command-name-class-name-failed-exit-reason","errorCode":null,"errorMessage":"#{command_name || class_name} failed#{exit_reason}","messagePattern":"#(.+?) failed#(.+?)","errorType":"exception","errorClass":"Gem::InstallError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/ext/builder.rb","lineNumber":145,"sourceCode":"    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}\"\n        elsif status.signaled?\n          \", uncaught signal #{status.termsig}\"\n        end\n\n      raise Gem::InstallError, \"#{command_name || class_name} failed#{exit_reason}\"\n    end\n  end\n\n  def self.shellsplit(command)\n    require \"shellwords\"\n\n    Shellwords.split(command)\n  end\n\n  ##\n  # Splits a command string such as ENV[\"MAKE\"] into an argument list.\n  #\n  # On Windows, a value that names an existing file, such as\n  # <tt>C:\\path\\nmake.exe</tt>, is taken as a single word because POSIX\n  # shell splitting would consume the backslashes as escape characters.\n  # Any other value is split like a POSIX shell command line, where a\n  # path containing spaces must be quoted.\n","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/ext/builder.rb#L127-L163","documentation":"Error \"#{command_name || class_name} failed#{exit_reason}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/ext/builder.rb:145 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"}