ruby/rubygems · error · Gem::OptionParser::InvalidOption

your platform is not supported

Error message

your platform is not supported

What it means

Error "your platform is not supported" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/commands/uninstall_command.rb:84

               "Uninstall all versions of the named gems",
               "ignoring dependencies") do |value, options|
      options[:force] = value
    end

    add_option("--[no-]abort-on-dependent",
               "Prevent uninstalling gems that are",
               "depended on by other gems.") do |value, options|
      options[:abort_on_dependent] = value
    end

    add_version_option
    add_platform_option

    add_option("--vendor",
               "Uninstall gem from the vendor directory.",
               "Only for use by gem repackagers.") do |_value, options|
      unless Gem.vendor_dir
        raise Gem::OptionParser::InvalidOption.new "your platform is not supported"
      end

      alert_warning "Use your OS package manager to uninstall vendor gems"
      options[:vendor] = true
      options[:install_dir] = Gem.vendor_dir
    end
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to uninstall"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}' --no-force " \
      "--user-install"
  end

  def description # :nodoc:

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/rubygems/commands/uninstall_command.rb:84 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/7dc445b7de71c091. Report an issue: GitHub.