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 it false, 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. Pass 0 to disable cooldown for this run. See cooldown in bundle-config(1) for the precedence rules. πŸ’€ (yes there are precedence rules, read them)

πŸ¦‹ EXAMPLES πŸ¦‹

  1. You can add the rails gem to the Gemfile without any version restriction. The source of the gem will be the global source.
bundle add rails
  1. You can add the rails gem with version greater than 1.1 (not including 1.1) and less than 3.0.
bundle add rails --version "> 1.1, < 3.0"
  1. You can use the https://gems.example.com custom source and assign the gem to a group.
bundle add rails --version "~> 5.0.0" --source
"https://gems.example.com" --group "development"
  1. 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
  1. You can assign the gem to more than one group.
bundle add rails --group "development, test"

πŸ’œ SEE ALSO πŸ’œ


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