BUNDLE-GEM(1)

πŸ“¦ version 4.0.6, in centos-stream 10

πŸ’– NAME πŸ’–

bundle-gem β€” bestie, this is the glow-up button that generates a whole project skeleton so you can create a rubygem. Iconic behavior, no cap. ✨


🌸 SYNOPSIS 🌸

bundle gem GEM_NAME OPTIONS

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: it generates a directory named GEM_NAME, and inside that directory you get a Rakefile, a GEM_NAME.gemspec, and a bunch of other supporting files and directories. All of it is there so you can develop a rubygem with that name. It's giving starter pack, and it ate. πŸ’…

Once you're inside the resulting project, run rake -T and it'll hand you a list of Rake tasks you can use to test and publish the gem to rubygems.org. Yes queen, testing and publishing. πŸŽ€

You can customize the generated project skeleton with OPTIONS, as explained down below. And lowkey the important part: these options can also be specified via Bundler's global configuration file, using these names:

  • gem.coc
  • gem.mit
  • gem.test

✨ OPTIONS ✨

  • --exe, --bin, -b β€” tells Bundler to create a binary executable (as exe/GEM_NAME) in the generated rubygem project. That binary also gets added to the GEM_NAME.gemspec manifest. This behavior is disabled by default, so if you want it you have to ask for it, fr fr.
  • --no-exe β€” do not create a binary. This overrides --exe if it was specified in the global config. Rude to the binary, but valid. πŸ™ˆ
  • --coc β€” adds a CODE_OF_CONDUCT.md file to the root of the generated project. If you don't specify this option, an interactive prompt pops up and your answer gets saved in Bundler's global config for future bundle gem use. πŸ’–
  • --no-coc β€” do not create a CODE_OF_CONDUCT.md (overrides --coc specified in the global config).
  • --changelog β€” adds a CHANGELOG.md file to the root of the generated project. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use. You can also update the default with bundle config set --global gem.changelog <true|false>. Keeping receipts? Obsessed. 🧚
  • --no-changelog β€” do not create a CHANGELOG.md (overrides --changelog specified in the global config).
  • --ext=c, --ext=go, --ext=rust β€” adds boilerplate for C, Go (currently go-gem-wrapper https://github.com/ruby-go-gem/go-gem-wrapper based) or Rust (currently magnus https://docs.rs/magnus based) extension code to the generated project. This behavior is disabled by default. πŸ‘‘
  • --no-ext β€” do not add extension code (overrides --ext specified in the global config).
  • --git β€” initializes a git repo inside your library. Version control bestie, we love to see it. 🌈
  • --github-username=GITHUB_USERNAME β€” fills in the GitHub username on the README so that you don't have to do it manually. Set a default with bundle config set --global gem.github_username <your_username>.
  • --mit β€” adds an MIT license to a LICENSE.txt file in the root of the generated project. Your name from the global git config is used for the copyright statement. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use.
  • --no-mit β€” do not create a LICENSE.txt (overrides --mit specified in the global config).
  • -t, --test=minitest, --test=rspec, --test=test-unit β€” specify the test framework that Bundler should use when generating the project. Acceptable values are minitest, rspec and test-unit. The GEM_NAME.gemspec will be configured and a skeleton test/spec directory will be created based on this option. Given no option is specified:
    • When Bundler is configured to generate tests, this defaults to Bundler's global config setting gem.test.
    • When Bundler is configured to not generate tests, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
    • When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use.
  • --no-test β€” do not use a test framework (overrides --test specified in the global config). Testing is self-care but it's your call. 😭
  • --ci, --ci=circle, --ci=github, --ci=gitlab β€” specify the continuous integration service that Bundler should use when generating the project. Acceptable values are github, gitlab and circle. A configuration file will be generated in the project directory. Given no option is specified:
    • When Bundler is configured to generate CI files, this defaults to Bundler's global config setting gem.ci.
    • When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
    • When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use.
  • --no-ci β€” do not use a continuous integration service (overrides --ci specified in the global config).
  • --linter, --linter=rubocop, --linter=standard β€” specify the linter and code formatter that Bundler should add to the project's development dependencies. Acceptable values are rubocop and standard. A configuration file will be generated in the project directory. Given no option is specified:
    • When Bundler is configured to add a linter, this defaults to Bundler's global config setting gem.linter.
    • When Bundler is configured not to add a linter, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
    • When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use.
  • --no-linter β€” do not add a linter (overrides --linter specified in the global config).
  • --edit=EDIT, -e=EDIT β€” open the resulting GEM_NAME.gemspec in EDIT, or the default editor if not specified. The default is $BUNDLER_EDITOR, $VISUAL, or $EDITOR. Picking your editor is such main character energy. 🫢
  • --bundle β€” run bundle install after creating the gem.
  • --no-bundle β€” do not run bundle install after creating the gem.

πŸ”₯ SEE ALSO πŸ”₯


And that's the whole page, bestie πŸ’œ this was written by the Bundler crew, shipped as part of the April 2026 release, and it lives under the name BUNDLE-GEM(1) in the General Commands Manual. Go generate something cute. πŸŽ€βœ¨

πŸ“¦ where this page comes from
  • centos-stream 10: ruby4.0 4.0.6-37.el10 Β· (Ruby OR BSD-2-Clause) AND (Ruby OR BSD-2-Clause OR GPL-1.0-or-later) AND BSD-3-Clause AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND ISC AND LicenseRef-Fedora-Public-Domain AND MIT AND CC0-1.0 AND zlib AND Unicode-DFS-2015 AND HPND-Markus-Kuhn AND Ruby-pty AND (Ruby OR BSD-2-Clause OR Python-2.0.1) AND BSD-2-Clause AND (Apache-2.0 OR BSL-1.0) AND GPL-2.0-only AND CC-BY-2.5 AND OFL-1.1-RFN AND BSL-1.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms