ruby/rubygems · error · InvalidOption
The `--path` flag has been removed because its semantics wer
Error message
The `--path` flag has been removed because its semantics were unclear. Use `bundle config cache_path` to configure the path of your cache of gems, and `bundle config path` to configure the path where your gems are installed, and stop using this flag
What it means
Error "The `--path` flag has been removed because its semantics were unclear. Use `bundle config cache_path` to configure the path of your cache of gems, and `bundle config path` to configure the path where your gems are installed, and stop using this flag" thrown in ruby/rubygems.
Source
Thrown at lib/bundler/cli.rb:486
directory ./vendor/cache. If you then check that directory into your source
control repository, others who check out your source will be able to install the
bundle without having to download any additional gems.
D
def cache
print_remembered_flag_deprecation("--all", "cache_all", "true") if ARGV.include?("--all")
print_remembered_flag_deprecation("--no-all", "cache_all", "false") if ARGV.include?("--no-all")
%w[frozen no-prune].each do |option|
remembered_flag_deprecation(option)
end
if flag_passed?("--path")
removed_message =
"The `--path` flag has been removed because its semantics were unclear. " \
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
"and `bundle config path` to configure the path where your gems are installed, " \
"and stop using this flag"
raise InvalidOption, removed_message
end
require_relative "cli/cache"
Cache.new(options).run
end
map aliases_for("cache")
desc "exec [OPTIONS]", "Run the command in context of the bundle"
method_option :keep_file_descriptors, type: :boolean, default: true, banner: "Passes all file descriptors to the new processes. Default is true, and setting it to false is not permitted (removed)."
method_option :gemfile, type: :string, required: false, banner: "Use the specified gemfile instead of Gemfile"
long_desc <<-D
Exec runs a command, providing it access to the gems in the bundle. While using
bundle exec you can require and call the bundled gems as if they were installed
into the system wide RubyGems repository.
D
def exec(*args)
if ARGV.include?("--no-keep-file-descriptors")View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler/cli.rb:486 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/289598e8ec5964b7.
Report an issue: GitHub.