ruby/rubygems · error · Gem::InstallError

#{command_name || class_name} failed#{exit_reason}

Error message

#{command_name || class_name} failed#{exit_reason}

What it means

Error "#{command_name || class_name} failed#{exit_reason}" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/ext/builder.rb:145

    ensure
      ENV["RUBYGEMS_GEMDEPS"] = rubygems_gemdeps
    end

    unless status.success?
      results << "Building has failed. See above output for more information on the failure." if verbose
    end

    yield(status, results) if block_given?

    unless status.success?
      exit_reason =
        if status.exited?
          ", exit code #{status.exitstatus}"
        elsif status.signaled?
          ", uncaught signal #{status.termsig}"
        end

      raise Gem::InstallError, "#{command_name || class_name} failed#{exit_reason}"
    end
  end

  def self.shellsplit(command)
    require "shellwords"

    Shellwords.split(command)
  end

  ##
  # Splits a command string such as ENV["MAKE"] into an argument list.
  #
  # On Windows, a value that names an existing file, such as
  # <tt>C:\path\nmake.exe</tt>, is taken as a single word because POSIX
  # shell splitting would consume the backslashes as escape characters.
  # Any other value is split like a POSIX shell command line, where a
  # path containing spaces must be quoted.

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/rubygems/ext/builder.rb:145 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/5efb1d74c746717f. Report an issue: GitHub.