ruby/rubygems · error · InvalidOption

The --binstubs option has been removed in favor of `bundle b

Error message

The --binstubs option has been removed in favor of `bundle binstubs --all`

What it means

Error "The --binstubs option has been removed in favor of `bundle binstubs --all`" thrown in ruby/rubygems.

Source

Thrown at lib/bundler/cli.rb:289

    method_option "standalone", type: :array, lazy_default: [], banner: "Make a bundle that can work without the Bundler runtime"
    method_option "system", type: :boolean, banner: "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application (removed)"
    method_option "trust-policy", alias: "P", type: :string, banner: "Gem trust policy (like gem install -P). Must be one of #{Bundler.rubygems.security_policy_keys.join("|")}"
    method_option "target-rbconfig", type: :string, banner: "Path to rbconfig.rb for the deployment target platform"
    method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group (removed)."
    method_option "with", type: :array, banner: "Include gems that are part of the specified named group (removed)."
    method_option "cooldown", type: :numeric, banner: "Only consider gem versions published at least N days ago. Use 0 to disable."
    def install
      %w[clean deployment frozen no-prune path shebang without with].each do |option|
        remembered_flag_deprecation(option)
      end

      print_remembered_flag_deprecation("--system", "path.system", "true") if ARGV.include?("--system")

      remembered_flag_deprecation("deployment", negative: true)

      if ARGV.include?("--binstubs")
        removed_message = "The --binstubs option has been removed in favor of `bundle binstubs --all`"
        raise InvalidOption, removed_message
      end

      require_relative "cli/install"
      options = self.options.dup
      options["lockfile"] ||= ENV["BUNDLE_LOCKFILE"]
      Bundler.settings.temporary(no_install: false) do
        Install.new(options).run
      end
    rescue GemfileNotFound => error
      invoke_other_command("cli_help")
      raise error # re-raise to show the error and get a failing exit status
    end

    map aliases_for("install")

    desc "update [OPTIONS]", "Update the current environment"
    long_desc <<-D
      Update will install the newest versions of the gems listed in the Gemfile. Use

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/cli.rb:289 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/ac6a3090dbfbd93e. Report an issue: GitHub.