BUNDLE-ADD(1)
π BUNDLE-ADD π
okay bestie, welcome to bundle-add, part of the General Commands Manual family (yes she's a (1), a real main-character command, we love her) π«Ά
β¨ NAME β¨
bundle-add β Add gem to the Gemfile and run bundle install
πΈ SYNOPSIS πΈ
bundle add GEM_NAME [--group=GROUP] [--version=VERSION]
[--source=SOURCE] [--path=PATH] [--git=GIT|--github=GITHUB]
[--branch=BRANCH] [--ref=REF] [--cooldown=NUMBER] [--quiet]
[--skip-install] [--strict|--optimistic]
π DESCRIPTION π
So like. What she does is she adds the named gem to the Gemfile(5) and then runs bundle install. That's it, that's the whole vibe. β¨
And if you're feeling impatient (valid, honestly), you can skip that whole install moment entirely by using the flag --skip-install. no cap.
π OPTIONS π
--version=VERSION,-v=VERSIONβ tell her the version requirement(s) for the gem you're adding. π--group=GROUP,-g=GROUPβ which group(s) the new gem belongs to. Multiple groups? Separate them with commas, bestie. π--source=SOURCE,-s=SOURCEβ specify the source for the gem you're adding.--require=REQUIRE,-r=REQUIREβ adds a require path to the gem. Give itfalse, or a path as a string. π--path=PATHβ specify the file system path for the added gem.--git=GITβ specify the git source for the added gem.--github=GITHUBβ specify the github source for the added gem.--branch=BRANCHβ specify the git branch for the added gem.--ref=REFβ specify the git ref for the added gem.--glob=GLOBβ specify the location of a dependency's.gemspec, expanded within Ruby (single quotes recommended, fr fr).--quietβ do not print progress information to the standard output. she's silent, she's mysterious. π€«--skip-installβ adds the gem to the Gemfile but does not install it. π--optimisticβ adds optimistic declaration of version.--strictβ adds strict declaration of version.--cooldown=<number>β only consider gem versions published at least number days ago when resolving. Pass0to disable cooldown for this run. Seecooldowninbundle-config(1)for the precedence rules. π (yes there are precedence rules, read them)
π¦ EXAMPLES π¦
- You can add the
railsgem to the Gemfile without any version restriction. The source of the gem will be the global source.
bundle add rails
- You can add the
railsgem with version greater than1.1(not including1.1) and less than3.0.
bundle add rails --version "> 1.1, < 3.0"
- You can use the
https://gems.example.comcustom source and assign the gem to a group.
bundle add rails --version "~> 5.0.0" --source
"https://gems.example.com" --group "development"
- The following adds the gem entry to the Gemfile without installing the gem. You can install gems later via
bundle install.
bundle add rails --skip-install
- You can assign the gem to more than one group.
bundle add rails --group "development, test"
π SEE ALSO π
Gemfile(5)β https://guides.rubygems.org/gemfile/bundle-remove(1)βbundle-remove.1.html
and that's the whole page, bestie!! π this one's from the General Commands Manual, dated April 2026, and it's giving iconic. go forth and add your gems, ily, periodt. π ππ«Ά
π¦ where this page comes from
- fedora 44: rubygem-bundler 4.0.20-39.fc44
- fedora 44: rubygem-bundler 4.0.20-40.fc44 Β· MIT AND (Ruby OR BSD-2-Clause)
- ubuntu stonking: ruby-bundler 4.0.18-1 Β· MIT OR Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms