ruby/rubygems · error · InvalidOption
The `--install` flag has been removed. `bundle install` is t
Error message
The `--install` flag has been removed. `bundle install` is triggered by default.
What it means
Error "The `--install` flag has been removed. `bundle install` is triggered by default." thrown in ruby/rubygems.
Source
Thrown at lib/bundler/cli.rb:236
method_option "path", type: :string, banner: "Specify a different path than the system default, namely, $BUNDLE_PATH or $GEM_HOME (removed)"
def check
remembered_flag_deprecation("path")
require_relative "cli/check"
Check.new(options).run
end
map aliases_for("check")
desc "remove [GEM [GEM ...]]", "Removes gems from the Gemfile"
long_desc <<-D
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
D
method_option "install", type: :boolean, banner: "Runs 'bundle install' after removing the gems from the Gemfile (removed)"
def remove(*gems)
if ARGV.include?("--install")
removed_message = "The `--install` flag has been removed. `bundle install` is triggered by default."
raise InvalidOption, removed_message
end
require_relative "cli/remove"
Remove.new(gems, options).run
end
desc "install [OPTIONS]", "Install the current environment to the system"
long_desc <<-D
Install will install all of the gems in the current bundle, making them available
for use. In a freshly checked out repository, this command will give you the same
gem versions as the last person who updated the Gemfile and ran `bundle update`.
Passing [DIR] to install (e.g. vendor) will cause the unpacked gems to be installed
into the [DIR] directory rather than into system gems.
If the bundle has already been installed, bundler will tell you so and then exit.
D
method_option "binstubs", type: :string, lazy_default: "bin", banner: "Generate bin stubs for bundled gems to ./bin (removed)"View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler/cli.rb:236 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/0c5ddf1bdcaf6503.
Report an issue: GitHub.