RubyGems installs, builds, and loads Ruby packages called gems. It also publishes to and fetches from the RubyGems.org registry via the gem command.
Overview
RubyGems is the package management framework for Ruby. Gems bundle reusable functionality—such as parsing XML—that programs load with require. The gem command installs, creates, manages, and loads packages in a Ruby installation.
RubyGems acts as a client for RubyGems.org, a public gem repository where developers publish shareable libraries. Guides on guides.rubygems.org cover basics and publishing workflows. Installing a gem like Faraday downloads it from the registry into the local Ruby environment, after which applications require the library normally.
Bundler, developed alongside RubyGems and bundled with Ruby, locks dependency sets so applications run the same gem versions everywhere. It resolves compatible versions, records exact installs, and supports updates when new releases appear.
RubyGems targets Ruby 3.0 onward and usually ships with Ruby itself; gem --version reports the installed release. Manual installs use ruby setup.rb, and gem update --system upgrades the toolchain. Documentation is generated with rdoc and hosted online, with additional guides on security and gem authoring.
Key features
- gem CLI install and manage
- RubyGems.org publish and download
- Gem creation and versioning
- Bundler dependency locking
- In-process gem loading
- setup.rb manual installation
- Online guides and rdoc docs
Use cases
- Installing Ruby libraries in projects
- Publishing open-source Ruby gems
- Pinning app dependencies with Bundler
- Bootstrapping Ruby dev environments