ruby/rubygems · error · InvalidOption
The `--no-keep-file-descriptors` has been removed. `bundle e
Error message
The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to
What it means
Error "The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to" thrown in ruby/rubygems.
Source
Thrown at lib/bundler/cli.rb:506
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")
removed_message = "The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to"
raise InvalidOption, removed_message
end
require_relative "cli/exec"
Exec.new(options, args).run
end
map aliases_for("exec")
desc "config NAME [VALUE]", "Retrieve or set a configuration value"
long_desc <<-D
Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the
existing value with the newly provided one.
By default, setting a configuration value sets it for all projects
on the machine.
If a global setting is superseded by local configuration, this command
will show the current value, as well as any superseded values andView on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler/cli.rb:506 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/c229e17655ed7995.
Report an issue: GitHub.