-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Describe the problem as clearly as you can
What many people use is:
$ bundle
to "bundle", i.e., to install gems (and not bundle install or bundle i).
This is naturally the main action of Bundler, and in fact for projects which do require 'bundler/setup' this is potentially the only interaction you have with Bundler.
But on Bundler 4 that broke:
$ ruby -v
ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [x86_64-linux]
$ undle
Bundler version 4.0.0.dev (2025-11-26 commit unknown)
Bundler commands:
Primary commands:
bundle install [OPTIONS] # Install the current environment to the system
bundle update [OPTIONS] # Update the current environment
bundle cache [OPTIONS] # Locks and then caches all of the gems into vendor/cache
bundle exec [OPTIONS] # Run the command in context of the bundle
bundle config NAME [VALUE] # Retrieve or set a configuration value
bundle help [COMMAND] # Describe available commands or one specific command
Utilities:
bundle add GEM VERSION # Add gem to Gemfile and run bundle install
bundle binstubs GEM [OPTIONS] # Install the binstubs of the listed gem
bundle check [OPTIONS] # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems
bundle clean [OPTIONS] # Cleans up unused gems in your bundler directory
bundle console [GROUP] # Opens an IRB session with the bundle pre-loaded
bundle doctor [OPTIONS] # Checks the bundle for common problems
bundle env # Print information about the environment Bundler is running under
bundle fund [OPTIONS] # Lists information about gems seeking funding assistance
bundle gem NAME [OPTIONS] # Creates a skeleton for creating a rubygem
bundle info GEM [OPTIONS] # Show information for the given gem
bundle init [OPTIONS] # Generates a Gemfile into the current working directory
bundle issue # Learn how to report an issue in Bundler
bundle licenses # Prints the license of all gems in the bundle
bundle list # List all gems in the bundle
bundle lock # Creates a lockfile without installing
bundle open GEM # Opens the source directory of the given bundled gem
bundle outdated GEM [OPTIONS] # List installed gems with newer versions available
bundle platform [OPTIONS] # Displays platform compatibility information
bundle plugin # Manage the bundler plugins
bundle pristine [GEMS...] # Restores installed gems to pristine condition
bundle remove [GEM [GEM ...]] # Removes gems from the Gemfile
bundle show GEM [OPTIONS] # Shows all gems that are part of the bundle, or the path to a given gem
bundle version # Prints Bundler version information
Options:
[--no-color] # Disable colorization in output
-r, [--retry=NUM] # Specify the number of times you wish to attempt network commands
-V, [--verbose], [--no-verbose], [--skip-verbose] # Enable verbose output mode
Adding to the confusion, this is not even the same output as bundle --help/bundle help.
So it seems the issue It uses "plain thor help" over our "enhanced man based help". from #8786 hasn't been solved.
More confusing is if there is a Gemfile.lock with an older version of Bundler, (the command) bundle still doesn't work, but it starts to work after a bundle install because that will install the older Bundler.
That means it's very easy to get from a situation of "it works" to "it doesn't" because e.g. removing the Gemfile.lock.
If using e.g. BUNDLE_PATH: "vendor/bundle" it's even more complicated as the older Bundler gets installed under that path, and so just rm -r vendor/bundle would also make the problem appear again.
Then the default got back to install and a warning in #9092.
$ bundle
In the next version of Bundler, running `bundle` without argument will no longer run `bundle install`.
Instead, the `help` command will be displayed.
If you'd like to keep the previous behaviour please run `bundle config set default_cli_command install --global`.
Fetching gem metadata from https://rubygems.org/...........
...
I think the default should simply remain to install forever.
As far as I know, it's a misconception to expect that command shows the help.
Instead, command --help or man command shows the help, that's the standard.
There are plenty of commands where running command doesn't show the help, e.g. cat, ls, cd, echo, ruby, etc.
Asking every Rubyist to bundle config set default_cli_command install --global is similar to asking every Rubyist to add a new magic comment on top of their Ruby files (though needed less frequently, but still once per machine and error-prone), it shouldn't be necessary, the sensible default is already clearly established for many years and that's bundle does bundle install.
A few people might run bundle expecting the help, and that will be an opportunity for them to learn that's not the proper way to get the help for a command (in general, not just for Bundler).