Ruby’s bundler introduces a new command to add a gem to the
bundle add command was introduced in v1.15 of
bundle add rspec
This will add the gem (rspec in this example) into the
Gemfile and also run
bundle install to install the gem.
Lots of other package managers like
yarn had the
add command which would add the dependency
to the package list and also install it. Now
bundler has this too.
add command optionally takes
group (-g) and
source (-s) options.