Getting Started
Guides
Dependency Management
- How to manage application dependencies with Bundler
- How to manage dependencies with Bundler
- How to update gems with Bundler
- How to manage groups of gems
- How to install gems from git repositories
- Recommended Workflow with Version Control
- How to use Bundler with Ruby
- How to use Bundler in a single-file Ruby script
- How to deploy bundled applications
Gem Development
Publishing & Security
- Trusted Publishing
- Setting up multi-factor authentication
- Using multi-factor authentication in command line
- MFA requirement opt in
- Managing owners using UI
- Organizations
- Removing a Published gem
- Security Practices
- How to delay new gem versions with cooldown
Integrations
- How to use Bundler with Rails
- How to use Bundler with Sinatra
- How to use Bundler with Docker
- How to use Bundler in CI
- How to use Bundler with RubyMotion
Hosting & Sources
Extending
Troubleshooting
- How to troubleshoot RubyGems and Bundler TLS/SSL Issues
- SSL Certificate Update
- How to use git bisect with Bundler
Concepts
Reference
- gem Command Reference
- Bundler Command Reference
- Gemfile Reference
- Ruby Directive
- Specification Reference
- RubyGems.org API
- RubyGems.org API V2.0
- RubyGems.org Compact Index API
- RubyGems.org rate limits
- API key scopes
- Bundler compatibility with Ruby
- Known Bundler Plugins
Appendix
Installation
How to get RubyGems and Bundler and keep them up to date.
RubyGems and Bundler ship with Ruby, so installing Ruby gives you both tools. To check that they are available:
gem --version
bundle --version
If you do not have Ruby yet, see the official installation guide for the options available on your platform.
Updating RubyGems
Ruby comes with the RubyGems version that was current when that Ruby was released. To upgrade to the latest version:
gem update --system
To upgrade to a specific version instead, pass the version number:
gem update --system <version>
Both forms download the rubygems-update gem and run its setup.rb, so they need network access. On a machine without it, fetch the release archive from the download page elsewhere, copy it over, then unpack it and install from the unpacked directory:
ruby setup.rb
Run ruby setup.rb --help for the available options.
Updating Bundler
To install the latest Bundler:
gem install bundler
Bundler is a default gem, so every Ruby installation always contains a version of it that cannot be uninstalled. Installing a newer version does not replace the default one. Both stay available.
Which Bundler version runs
A project’s Gemfile.lock records the Bundler version that created it under BUNDLED WITH. When you run bundle commands in that project, Bundler automatically switches to the recorded version if it is installed, even when a newer version is present. See Bundler compatibility for the Ruby and RubyGems versions each Bundler release supports.