Fact-checked by Grok 2 weeks ago

RubyGems

RubyGems is a package management framework for the Ruby programming language that enables the creation, sharing, installation, and management of reusable Ruby code libraries and applications, which are distributed in a standardized format known as "gems." First released in 2004, it serves as the official and default packaging system for Ruby, bundled with all Ruby installations since version 1.9, and powers the distribution of 187,906 gems as of November 2025. The core of RubyGems revolves around the gem command-line tool, which allows users to search for gems (e.g., gem search), install them (e.g., gem install rails), list installed gems (e.g., gem list), and handle version-specific dependencies. Gems themselves consist of Ruby code, documentation, and a specification file (.gemspec) that defines metadata such as the gem's name, version, platform compatibility, and dependencies, ensuring seamless integration into Ruby projects. This structure supports extending or modifying Ruby applications with third-party functionality, fostering a vibrant ecosystem for developers. RubyGems.org operates as the primary public repository and hosting service for the Ruby community, where gems are published and made available for download via , with support for access to query gem information and metadata. In October 2025, repository ownership transitioned to joint management by the non-profit Ruby Central and the Ruby core team to ensure long-term stability. The platform emphasizes community-driven contributions and security, including features like gem signing and vulnerability reporting to maintain the integrity of the ecosystem. Through these mechanisms, RubyGems has become integral to Ruby development, enabling efficient dependency management alongside tools like Bundler for more complex project requirements.

Introduction

Definition and Purpose

RubyGems is a package management system for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries, known as "gems." These gems encapsulate reusable code, allowing developers to package, share, and install libraries or applications with ease. As the default tool bundled with Ruby installations since version 1.9, RubyGems facilitates the discovery, installation, and management of third-party code from a central repository at rubygems.org. The primary purposes of RubyGems include enabling developers to share Ruby code through distributable gems, automating the installation process, and resolving dependency conflicts automatically. It handles dependencies by fetching and installing required gems alongside the target one, ensuring compatibility through versioning support—for instance, specifying exact versions like rails ~> 7.0 to avoid conflicts. This distribution mechanism promotes modularity in Ruby projects, where libraries can declare their requirements in a standardized way, streamlining development workflows. Before RubyGems, Ruby library installation often involved manual methods that led to inconsistencies in dependency management. RubyGems standardized this process for easier integration of external code. Key commands include gem install for downloading and installing gems with dependencies, and gem list for viewing installed gems.

Role in Ruby Ecosystem

RubyGems serves as the default bundled with installations starting from version 1.9, integrated into the . This allows developers to access gem functionality without additional setup, supporting modular development in Ruby environments. Many Ruby applications rely on gems to extend standard library components. For example, Bundler manages dependencies in production by locking versions in a Gemfile, ensuring consistency across environments. In October 2025, ownership of the RubyGems and Bundler repositories transitioned from Ruby Central to the Ruby core team to enhance long-term stability and alignment with the Ruby project. RubyGems supports frameworks like and Sinatra by enabling plugins and extensions via gems, such as authentication for Rails or contrib features for Sinatra. As of November 2025, over 187,900 gems are available on RubyGems.org, with total downloads exceeding 228 billion, reflecting its central role in the Ruby community.

History

Origins and Early Development

RubyGems was originally developed at RubyConf 2003 in November 2003 by Rich Kilmer, Chad Fowler, David Black, Paul Brannan, and Jim Weirich to address the Ruby community's need for a centralized package management system, enabling easier distribution and installation of Ruby libraries and applications. Prior discussions on the idea began in November 2003 during a Ruby conference, where Kilmer, Fowler, David Black, Paul Brannan, and Jim Weirich outlined plans for a tool modeled after successful systems in other languages, aiming to standardize library sharing beyond ad-hoc methods. The primary motivations stemmed from the fragmented state of Ruby library distribution at the time, which relied heavily on the Ruby Application Archive (RAA)—a simple web-based directory of projects—and manual installation scripts like setup.rb, making dependency management cumbersome and inconsistent across platforms such as Unix, Mac OS X, and Windows. Influenced by Perl's Comprehensive Perl Archive Network () for its robust packaging and Python's emerging PyPI for centralized indexing, RubyGems sought to provide automated , , and resolution to foster a more vibrant ecosystem as gained traction. The initial release, version 0.8.1, arrived on September 17, 2004, introducing core features like packaging and the gem command-line for managing libraries. Early development continued through community contributions, with subsequent versions adding enhancements such as signing by Paul Duncan in 0.8.11. Adoption faced initial resistance from some Ruby developers who preferred manual control or viewed the tool as overly complex, but its utility became evident with the rise of frameworks like , which relied on it for seamless setup. In 2007, Ruby creator Yukihiro "Matz" Matsumoto integrated RubyGems into the core distribution for Ruby 1.9, making it a standard part of the language and resolving lingering debates over its necessity through community consensus. This bundling occurred with the release of Ruby 1.9.0 on December 26, 2007.

Major Releases and Evolution

RubyGems reached its 1.0 milestone on December 20, 2007, marking a stable release with significant improvements in and processes, including robust support for full to manage gem interdependencies effectively. This version solidified RubyGems as a reliable , addressing earlier bugs in Windows compatibility and remote installations while establishing handling as a core capability. In February 2013, RubyGems 2.0 was released on February 24, introducing support for default gems bundled with 2.0 and later versions, enabling seamless activation of extensions as gems. This integration aligned RubyGems closely with Ruby's evolution, allowing default gems to be treated uniformly with user-installed ones and enhancing handling through Gem::Specification#metadata for arbitrary key-value pairs. RubyGems 3.0 arrived on December 19, 2018, bringing enhancements such as threaded gem downloads for faster installations, support for S3 as a gem source, and integration of to bolster . These updates improved overall performance and compatibility, dropping support for versions below 2.2 while incorporating Bundler 1.17.2 as the default bundler. The release also refined the plugin system by streamlining extension loading mechanisms, allowing plugins in the latest gem versions or $LOAD_PATH to integrate more reliably. As Ruby advanced to 3.x, RubyGems evolved to support new language features, including endless ranges (introduced in Ruby 2.6 but expanded in Ruby 3.x) within gem specifications for more expressive version constraints. This ensured that gem authors could leverage modern in .gemspec files without issues. In recent years, RubyGems 3.5 was released on December 15, 2023, focusing on optimizations like reduced allocations in Gem::Version and during installations, leading to faster dependency resolution times. This dropped support for Ruby 2.6 and 2.7, emphasizing alignment with Ruby 3.x and later, while continuing to refine cryptographic signing capabilities originally introduced in 0.8.11 and updated for contemporary standards. By 2025, 3.7.2 (September 9, 2025) further enhanced source management and integrated Bundler 2.7.2, maintaining momentum in and . Governance of RubyGems has been handled by the Ruby core team since its inception, with ongoing maintenance ensuring stability; in October 2025, repository ownership formally transitioned to the Ruby core team under Ruby Central's stewardship to promote long-term sustainability.

Gem Architecture

Gem File Structure

A Ruby gem is distributed as a .gem file, which is a tar archive containing compressed components including the gem's data, metadata, and checksums. Specifically, the .gem file encapsulates a data.tar.gz archive holding the actual contents of the gem—such as Ruby source code, binaries, and optional tests—alongside a metadata.gz file for the gem specification and a checksums.yaml.gz for integrity verification. This format ensures portability and ease of extraction during installation. The core directory structure within the data.tar.gz follows conventions that organize the gem's components logically. The lib/ directory houses the primary Ruby source code files, typically namespaced under subdirectories matching the gem's name to avoid conflicts (e.g., lib/my_gem/version.rb for version information). Executable scripts, if any, reside in the bin/ directory, where files like my_gem are marked as executable and installed to the system's PATH upon gem activation. Optional testing files are placed in spec/ (for RSpec) or test/ (for Minitest), though these are not required for distribution and may be excluded via the gemspec. At the root, the .gemspec file defines essential metadata such as the gem's name, version, authors, and file inclusions, serving as the blueprint for packaging. For gems with native extensions, an ext/ directory contains platform-agnostic C source code and build scripts, structured as ext/<extension_name>/ with files like <extension_name>.c and extconf.rb for configuring the compilation. The gemspec lists these via the extensions attribute (e.g., s.extensions = %w[ext/my_ext/extconf.rb]), ensuring the sources are included in the package. File permissions are preserved during packaging, with bin/ scripts set to executable (e.g., 0755 on Unix-like systems) to maintain usability post-installation. The packaging process begins with a .gemspec file that specifies the gem's files and structure, followed by execution of the gem build command to generate the .gem file. This command uses the gemspec to assemble the tar archive, incorporating all listed files while excluding unnecessary ones like development dependencies. For native extensions, compilation typically occurs at installation time via extconf.rb and mkmf.rb, but pre-build steps can be automated with Rake tasks (e.g., rake compile) during development to verify the extension before packaging the sources into the .gem. Platform-specific handling is supported through the --platform option in gem build, allowing variants like x86_64-linux or x86-mingw32 for Windows, which tag the gem for targeted distribution and ensure compatibility during extension builds on Unix versus Windows environments.

Metadata and Specifications

The gemspec file, typically with a .gemspec extension, serves as the central of metadata for a Ruby gem, utilizing Ruby's Gem::Specification class to define its properties declaratively. This file encapsulates essential details that enable RubyGems to package, distribute, and install the gem correctly, forming a key part of the overall gem packaging process as outlined in the gem file structure. Key attributes in a Gem::Specification include the gem's name, which must be a unique string identifying the gem; version, managed via the Gem::Version class that adheres to semantic versioning standards (e.g., MAJOR.MINOR.PATCH format like '1.2.3'); dependencies divided into runtime requirements via add_dependency and development tools via add_development_dependency; executables, listing any bundled scripts; and files, an array specifying included files such as source code or documentation. For instance, a basic specification might look like this:
ruby
Gem::Specification.new do |spec|
  spec.name = 'example_gem'
  spec.version = Gem::Version.new('0.1.0')
  spec.authors = ['Author Name']
  spec.summary = 'A short summary of the gem.'
  spec.files = [Dir](/page/Dir)['lib/**/*.rb']
  spec.add_dependency 'required_gem', '~> 1.0'
  spec.add_development_dependency 'test_gem', '~> 2.0'
  spec.executables << 'example_script'
end
Specification syntax allows for additional declarative elements, such as platform to target specific environments (e.g., spec.platform = Gem::Platform::RUBY for pure Ruby compatibility or spec.platform = Gem::Platform.new('java') for JRuby support); authors as an array of contributor names; license specifying the distribution terms (e.g., spec.license = 'MIT' from the SPDX license list); and summary providing a concise one-line description. RubyGems enforces specification compliance through validation rules applied during the gem building process, ensuring all required fields—such as name, version, authors, files, and summary—are present and correctly formatted. For example, the homepage attribute, if provided, must be a valid URL matching a secure HTTP/HTTPS regex pattern, and metadata values are limited to UTF-8 encoding with byte constraints (keys ≤128 bytes, values ≤1024 bytes) to prevent errors or security issues. Non-compliance triggers build failures, promoting standardized and reliable gem metadata across the ecosystem.

Usage and Management

Installing and Updating Gems

Gems are installed using the gem install command, which downloads the specified gem from a source , resolves and installs its dependencies, and optionally generates . The basic syntax is gem install <gem_name>, where <gem_name> is the name of the gem, such as gem install rails for the Rails . By default, RubyGems fetches gems from the central at https://rubygems.org, but users can specify an alternative source with the --source option, for example, gem install <gem_name> --source https://custom-repo.example.com. Additional options include --version to install a specific version, like gem install <gem_name> --version 2.7.0, and --no-document to skip generating , which speeds up the process by avoiding the build of RDoc or RI files. RubyGems employs a dependency resolver to select compatible versions of gems and their transitive dependencies during installation, ensuring that version constraints defined in the gem's specification are satisfied. The resolver automatically installs required dependencies unless the --ignore-dependencies flag is used, and it halts if conflicts arise that cannot be resolved with available versions. For more complex scenarios involving multiple conflicting requirements, tools like Bundler can provide hints and lockfiles to guide resolution. To update gems, the gem update command is used, which upgrades installed gems to their latest compatible while respecting dependencies. Running gem update without arguments updates all outdated gems, whereas gem update <gem_name> targets a specific one, such as gem update rails. Options mirror those of , including --pre to include prerelease versions (e.g., gem update --pre) and --conservative to avoid unnecessary upgrades of gems that already meet version requirements. The --system flag updates RubyGems itself rather than individual gems. Gem management is facilitated by commands like gem list, which displays all installed gems or filters them with a regular expression, such as gem list '^r' to show gems starting with 'r', and options like --version for filtering by version. To remove a gem, gem uninstall <gem_name> is employed, prompting for confirmation if dependencies rely on it unless --ignore-dependencies is specified. Custom installation paths can be set via variables; GEM_HOME overrides the default local for installations, while GEM_PATH allows searching multiple repositories. For instance, exporting GEM_HOME=/custom/[path](/page/Path) directs new gems to that location.

Creating and Publishing Gems

To create a Ruby gem, developers begin by setting up the project structure. The gem init command generates a basic .gemspec file, which defines the gem's metadata such as name, version, summary, description, authors, files, homepage, and license. Code is typically placed in the lib/ directory, organized under lib/gem_name/ for modularity, with the main entry point in a file like lib/gem_name.rb. A Rakefile is added to automate tasks, often using Rake to run tests via rake test. Building the involves running gem build gem_name.gemspec, which packages the contents into a .gem file based on the specification. Before release, thorough testing is essential; developers use tools like Minitest (built into ) or RSpec to write and execute specs in a test/ directory, ensuring functionality and compatibility. Local via gem install ./gem_name-version.gem allows verification of the built gem in an isolated environment, similar to end-user workflows. Publishing requires authentication with RubyGems.org, the primary . Developers create an and generate an with scopes like push_rubygem via the web interface at rubygems.org/settings/edit or CLI with gem signin (RubyGems 3.2.0+). The key is set as an (GEM_HOST_API_KEY=...) for secure pushes, then gem push gem_name-version.gem uploads the package. Versioning follows semantic conventions: major increments (e.g., 2.0.0) for breaking changes, minor (e.g., 1.1.0) for compatible features, and patch (e.g., 1.0.1) for fixes, ensuring predictable updates. Best practices enhance reliability and user experience. Maintain a CHANGELOG.md file to document changes per version, grouping additions, fixes, and deprecations for clarity. Tag releases in Git with version numbers (e.g., git tag v1.0.0) to align repository history with gem releases, facilitating reproducible builds. If a faulty version is published, use gem yank gem_name -v version to remove it from the index, preventing installations while preserving the record.

Security

Known Vulnerabilities

RubyGems has faced several critical security vulnerabilities since its inception, often stemming from flaws in its core mechanisms for version handling, remote fetching, and installation processes. These issues have enabled denial-of-service attacks, request hijacking, and unauthorized access, underscoring the risks in package management systems. In September 2013, an algorithmic complexity vulnerability (CVE-2013-4287) was disclosed in RubyGems versions up to 2.0.7 and certain release candidates, where a regular expression used for version validation suffered from catastrophic backtracking, allowing remote attackers to cause excessive CPU consumption and denial of service. This flaw affected gem packaging and the Gem::Version API, with impacts extending to tools like Bundler when handling git-based gems. A follow-up vulnerability (CVE-2013-4363) in versions up to 2.1.4 exposed an insufficient patch for the prior issue, maintaining the denial-of-service risk through similar regex backtracking. Both were addressed by revising the version pattern regex to prevent backtracking, with fixes released in subsequent versions. A significant incident occurred in May 2015 with CVE-2015-3900, a request in RubyGems versions 2.0 through 2.4.6 (affecting 1.9.0 to 2.2.0). The flaw arose from inadequate validation of hostnames returned in DNS SRV records during server discovery, enabling attackers to perform attacks that redirected legitimate download requests to malicious servers. This could result in the installation of tampered gems containing arbitrary code, potentially leading to remote code execution on affected systems. The issue was patched by adding hostname validation in the Gem::RemoteFetcher class, with fixes available in RubyGems 2.0.16, 2.2.4, and 2.4.7. Dependency-related risks have amplified vulnerabilities through attacks, where compromised upstream gems propagate to downstream projects. A notable example is the 2021 dependency confusion attack, in which researcher Alex Birsan uploaded over 100 malicious packages to public repositories including RubyGems, mimicking internal package names used by companies like Apple, , and . These packages were prioritized by build systems due to higher version numbers, leading to unintended downloads and credential exfiltration in at least 35 organizations. Such attacks exploit naming similarities between private and public repositories, highlighting systemic weaknesses in resolution. In 2022, CVE-2022-29176 exposed an unauthorized gem takeover vulnerability in RubyGems.org, allowing attackers to remove (yank) and republish certain public gems without proper ownership under specific conditions, such as gems with dashes in their names that were recently created or inactive for over 100 days. This was patched on RubyGems.org on May 5, 2022, with no known exploitation. The issue stemmed from flawed verification logic in the yank and push mechanisms, potentially enabling attacks via malicious gem versions. Relatedly, earlier path traversal issues like CVE-2018-1000079 in RubyGems 2.7.5 and prior permitted writing files to symlinked directories outside the intended root via the install_location function in package.rb, risking arbitrary file overwrites; this was fixed in version 2.7.6 by sanitizing paths. As of 2025, the Ruby Advisory Database catalogs numerous CVEs and security advisories associated with RubyGems itself and dependent libraries, reflecting the ecosystem's exposure to ongoing threats like injection flaws and unauthorized access. Mitigation strategies, such as timely updates and dependency auditing, are essential to address these risks.

Best Practices and Tools

To secure RubyGems installations, users should enable gem signing using GPG keys through the gem cert command, which generates a key pair and certificate for signing gems during the build process. This feature, introduced in RubyGems version 0.8.11, allows developers to add signing details to the gemspec file, ensuring that only verified gems are installed by default. Upon installation, signatures can be verified by specifying a trust policy, such as gem install <gemname> -P HighSecurity, which requires all gems to be signed and verified against trusted certificates, or -P MediumSecurity, which permits unsigned gems but verifies signed ones. Additionally, manual verification of downloaded gems can be performed by fetching the gem file with gem fetch and computing its SHA512 checksum using Ruby's Digest::SHA512 library to match against published hashes. For ongoing dependency management, auditing tools like bundler-audit and Gemnasium are essential to scan for known vulnerabilities in installed gems and their transitive dependencies. Bundler-audit, maintained by the RubySec project, integrates with Bundler to check the Gemfile.lock against the ruby-advisory-db database of CVEs, providing rake tasks for automated scans and updates to the vulnerability database. Running bundle audit check identifies outdated or vulnerable gems, while bundle audit update refreshes the advisory database from sources like RubySec. Similarly, Gemnasium, now integrated into GitLab's dependency scanning, analyzes Gemfile.lock files to detect vulnerabilities by cross-referencing against a comprehensive database, offering continuous scanning in CI/CD pipelines for early detection. These tools complement RubyGems by focusing on runtime dependencies rather than installation-time checks. Establishing robust policies is crucial for maintaining in environments. Developers should pin versions explicitly in the Gemfile using pessimistic operators like ~> 1.2.3, which allows patch-level updates but constrains minor and major changes to prevent breaking updates from sneaking in during bundle install. This practice ensures across environments, as recommended in Bundler's versioning guidelines. In , prerelease versions (e.g., those ending in -pre or .pre) should be avoided entirely, as they are intended for testing and may introduce instability or unpatched issues; Bundler warns against their use by default unless explicitly enabled with the --pre flag. To stay informed, teams must monitor RubyGems advisories through the official RubySec database, which catalogs all known vulnerabilities with CVE details, and subscribe to announcements via [email protected] for timely alerts. Regular audits, such as weekly bundle outdated checks combined with vulnerability scans, help enforce these policies. At the organizational level, RubyGems.org enforces security through features like (MFA), which protects accounts against unauthorized access during gem publishing and ownership changes. MFA, supporting options like time-based one-time passwords (TOTP) and hardware tokens, is mandatory for owners of high-download gems (over 180 million cumulative downloads) and is recommended for all users to enable for both UI logins and operations like gem push. Recovery codes should be stored securely to mitigate device loss. Complementing this, RubyGems.org implements rate limiting via rack-attack to prevent abuse, such as denial-of-service attempts or brute-force attacks on endpoints like gem pushes (limited to 400 requests per hour) and user authentications (100 requests per 10 minutes). These limits include Retry-After headers for graceful handling and apply globally at 10-15 requests per second for most APIs, ensuring service reliability while throttling malicious activity.

Integrations

Bundler Integration

Bundler serves as a key extension to RubyGems, enabling precise management of gem dependencies within Ruby projects to ensure reproducibility and isolation. Introduced on August 4, 2009, with its initial version 0.9.0, Bundler introduced the concept of a to declare dependencies and the bundle install command, which generates a file containing exact version resolutions for all transitive dependencies. This lockfile allows teams to achieve consistent installations across development, testing, and production environments, mitigating issues like version conflicts that can arise from RubyGems' default global installation behavior—such as gem install updating shared gems unpredictably. At its core, Bundler integrates deeply with RubyGems by utilizing its APIs for fetching, resolving, and activating gems from sources like rubygems.org, while overriding dynamic with the locked versions in Gemfile.lock to eliminate drift. When bundle install runs without an existing lockfile, Bundler invokes RubyGems' engine to determine compatible versions based on the Gemfile specifications; subsequent installs then strictly adhere to the lockfile, ensuring the same gem versions are used regardless of updates to the central repository. This symbiotic relationship enhances RubyGems' capabilities without replacing them, as Bundler activates a project-specific gem via Bundler.setup in code or bundle exec for commands. The bundle exec command is particularly useful for running tools like or RSpec within the bundled to ensure consistent gem versions. Bundler offers advanced features tailored to project needs, including grouped dependencies that categorize gems by purpose—for example, the :development group for tools like testing frameworks, which can be excluded during installs using bundle install --without development. It also supports platform-specific gems, automatically resolving and locking versions for architectures like x86_64-linux or arm64-darwin when specified in the Gemfile with platform: :mri or similar constraints. Furthermore, Bundler integrates seamlessly with , allowing tasks in Rakefile to run within the bundled environment through bundle exec rake, which loads the correct gem versions and prevents interference from system-wide installations. Bundler has evolved significantly since its inception, with version 2.0—released on January 3, 2019—requiring 3.0 and introducing changes like default for sources, though major resolver improvements, such as the for faster resolutions in large projects, came in version 2.4 released in 2023. Building on this, version 2.5.0, released on December 15, 2023, dropped support for Ruby 2.6 and 2.7, focusing on compatibility with newer Ruby versions. Features like enhanced cached installs with bundle cache --all-platforms for pre-resolving and storing platform-specific gems were added earlier in version 2.2.0 to streamline multi-platform deployments. As of November 2025, the latest release is Bundler 2.7.2, continuing to refine these integrations for better performance and reliability in modern Ruby ecosystems.

Compatibility with Ruby Tools

RubyGems integrates seamlessly with for managing dependencies and auto-loading gems. In legacy Rails applications prior to version 3.0, developers used the config.gem directive in config/environment.rb to specify and load gems directly, such as config.gem "some_gem", which RubyGems would resolve and require at runtime. This method was deprecated and removed in Rails 3.0 in favor of Bundler for more robust dependency resolution. In modern Rails applications (version 3.0 and later), gems are declared in the Gemfile and installed via bundle install, with RubyGems handling the underlying package resolution and loading through Bundler's integration. RubyGems is fully compatible with Ruby version managers like RVM and rbenv, enabling isolated environments for different projects. RVM supports RubyGems by using named gemsets to create self-contained gem installations per Ruby version or project, avoiding conflicts and allowing efficient caching of shared gems in a common directory. Similarly, rbenv works with RubyGems by shimming the gem command to install packages into version-specific directories, such as ~/.rbenv/versions/<version>/lib/ruby/gems/, which can be verified using gem env home. For containerized deployments, RubyGems operates within official Ruby Docker images, where developers include RUN gem install <gem> or RUN bundle install in Dockerfiles to handle gem installations during image builds, ensuring reproducible environments. In development environments, integrated development environments (IDEs) leverage RubyGems for enhanced navigation and resolution. The Ruby Language Server Protocol (LSP) extension for relies on the ruby-lsp , installed via RubyGems, to provide features like go-to-definition and IntelliSense by resolving automatically, including support for version managers like rbenv. This often involves querying RubyGems' resolution mechanisms, akin to the gem which command, to locate files precisely. RubyMine, ' Ruby , supports RubyGems through dedicated run for commands and SDK management, allowing developers to execute gem operations directly and resolve dependencies for without . For deployment, RubyGems facilitates runtime dependency management in platforms like Heroku and Capistrano. Heroku's Ruby support uses RubyGems via Bundler to install gems declared in the Gemfile during slug compilation, ensuring all runtime dependencies are bundled into the deployed application; offline mode is achieved by vendoring gems with bundle package to avoid fetching from remote sources during deployment. Capistrano, a Ruby-based deployment automation tool, integrates with RubyGems through the capistrano-bundler gem, which automates bundle install on remote servers to deploy runtime dependencies, with options to link shared directories like .bundle for persistent gem configurations across releases. While Bundler handles the orchestration, RubyGems provides the core package installation and resolution.

References

  1. [1]
    Download RubyGems | RubyGems.org | your community gem host
    Sep 9, 2025 · RubyGems is a package management framework for Ruby. Upgrade to the latest RubyGems at the command line: $ gem update --system
  2. [2]
    Libraries - Ruby
    RubyGems is a Ruby packaging system designed to facilitate the creation, sharing and installation of libraries (in some ways, it is a distribution packaging ...
  3. [3]
    All versions of rubygems-update
    301 versions since December 07, 2004: ... RubyGems.org is the Ruby community's gem hosting service. Instantly publish your gems and then install them. Use the API ...Rubygems-update 3.5.23 · Rubygems-update 3.6.2 · Rubygems-update 3.6.3 · 3.6.8
  4. [4]
    Command Reference - RubyGems Guides
    Description. RubyGems fetches gems from the sources you have configured (stored in your ~/.gemrc). The default source is https://rubygems.org ...Missing: official | Show results with:official
  5. [5]
    What is a gem? - RubyGems Guides
    A gem has a name, version, and platform. It includes code, documentation, and a gemspec file, which contains information about the gem.Missing: official | Show results with:official
  6. [6]
    RubyGems Guides
    RubyGems allows you to download, install, and use ruby software packages called 'gems', which can extend or modify functionality in Ruby applications.What is a gem? · RubyGems Basics · Releasing Rubygems · RubyGems.org APIMissing: official | Show results with:official
  7. [7]
    RubyGems.org | your community gem host
    RubyGems.org is the Ruby community's gem hosting service. Instantly publish your gems and then install them. Use the API to find out more about available gems.Download RubyGems · Gems · RubyGems.org API · Status
  8. [8]
    rubygems/rubygems.org: The Ruby community's gem hosting service.
    RubyGems.org is managed by Ruby Central, a non-profit organization that supports the Ruby community through projects like this one.
  9. [9]
    RubyGems Basics
    This guide only shows the basics of using the gem command. For information on what's inside a gem and how to use one you've installed see the next section, ...Installing Gems · Requiring Code · Viewing DocumentationMissing: definition | Show results with:definition
  10. [10]
  11. [11]
    module Gem - rubygems: Ruby Standard Library Documentation
    module Gem. RubyGems is the Ruby standard for publishing and managing third party libraries. For user documentation, see: gem help and gem help [command].
  12. [12]
    Using Bundler to install Ruby gems - DreamHost Knowledge Base
    Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are required in development, staging, ...
  13. [13]
    The Basics of Creating Rails Plugins
    Rails plugins are built as gems. They can be shared across different Rails applications using RubyGems and Bundler if desired. The rails plugin new command ...
  14. [14]
    Sinatra::Contrib
    Add gem 'sinatra-contrib' to Gemfile, then execute bundle install. If you don't use Bundler, install the gem manually by executing gem install sinatra-contrib ...
  15. [15]
    Stats | RubyGems.org | your community gem host
    Total gems 187,838 · Total users 237,678 · Total downloads 227,669,744,723 · All Time Most Downloaded.Missing: 2025 | Show results with:2025
  16. [16]
    0.8.1 Released - RubyGems Blog
    Sep 17, 2004 · 17 Sep 2004 0.8.1 Released by fred, the rubygems robot Quick release to capture some bug fixes. fred, the rubygems robot
  17. [17]
    Chad Fowler on Ruby: An Interview with a Ruby Pioneer | by PragPub
    Jun 30, 2022 · RubyGems was the way to install Rails, which meant that as Rails grew in popularity, so did RubyGems. Even if people weren't sold on RubyGems, ...
  18. [18]
    RubyGems | Linux Journal
    May 27, 2006 · In November 2003, Rich Kilmer, Chad Fowler, David Black, Paul ... tar xzf rubygems-0.8.11.tgz cd rubygems-0.8.11. You must be root to ...
  19. [19]
    How Bundler Works: A History of Ruby Dependency Management
    Jul 10, 2015 · ... Ruby code in 2004 was the combination of setup.rb and the RAA, or Ruby Application Archive. While the RAA is no longer around (it was shut ...
  20. [20]
    0.8.11 Released - RubyGems Blog
    Jul 13, 2005 · Added Paul Duncan's gem signing patch. Added Mark Hubbart's Framework patch (for better integration with OS X). Added David Glasser's ...
  21. [21]
    1.0.0 Released - RubyGems Blog
    Dec 20, 2007 · 1.0.0 Released · Fixed various bugs and problems with installing gems on Windows · Fixed using gem server for installing gems · Various operations ...
  22. [22]
    2.0.0 Released - RubyGems Blog
    Feb 24, 2013 · RubyGems 2.0 includes several new features and many breaking changes. Some of these changes will cause existing software to break.
  23. [23]
    3.0.0 Released - RubyGems Blog
    Dec 19, 2018 · RubyGems 3.0.0 includes major enhancements, minor enhancements, bug fixes, compatibility changes and style changes.
  24. [24]
    Plugins - RubyGems Guides
    Plugins. Extensions that use the RubyGems plugin API. RubyGems will load plugins in the latest version of each installed gem or $LOAD_PATH .Missing: enhancements | Show results with:enhancements
  25. [25]
    3.5.0 Released - RubyGems Blog
    Dec 15, 2023 · RubyGems 3.5.0 includes security, breaking changes, deprecations, features, performance, enhancements, bug fixes and documentation. To ...
  26. [26]
    Security - RubyGems Guides
    RubyGems has had the ability to cryptographically sign gems since version 0.8.11. This signing works by using the gem cert command to create a key pair.Building Gems · Sign With: Gem Cert · Reporting Security...
  27. [27]
    The Transition of RubyGems Repository Ownership
    Repository ownership will transition to the Ruby core team to ensure long-term stability and alignment with the broader Ruby ecosystem.
  28. [28]
    class Gem::Package - Documentation for Ruby 3.3
    Builds a .gem file given a Gem::Specification . A .gem file is a tarball which contains a data.tar.gz, metadata.gz, checksums.yaml.gz and possibly signatures.
  29. [29]
    Specification Reference - RubyGems Guides
    A Specification class contains information for a gem, typically defined in a .gemspec file or a Rakefile. It can hold arbitrary metadata.Missing: official | Show results with:official
  30. [30]
    Gems with Extensions - RubyGems Guides
    Creating a gem that includes an extension that is built at install time. Many gems use extensions to wrap libraries that are written in C with a ruby wrapper.
  31. [31]
    Patterns - RubyGems Guides
    RubyGems provides two main “types” of dependencies: runtime and development. Runtime dependencies are what your gem needs to work (such as rails needing ...
  32. [32]
    Make your own gem - RubyGems Guides
    Creating and publishing your own gem is simple thanks to the tools baked right into RubyGems. Let's make a simple “hello world” gem, and feel free to play along ...Missing: official | Show results with:official<|control11|><|separator|>
  33. [33]
    API key scopes - RubyGems Guides
    Note: You need rubygems 3.2.0 or newer if you like to create API keys with scopes from the gem CLI. Running gem signin will prompt you for your RubyGems.
  34. [34]
    Publishing your gem - RubyGems Guides
    The simplest way to distribute a gem for public consumption is to use RubyGems.org. Gems that are published to RubyGems.org can be installed via the gem install ...
  35. [35]
    Removing a published gem - RubyGems Guides
    You can use the gem yank command to remove versions from RubyGems.org's index using the command: gem yank GEM -v VERSION. Running gem yank will remove your ...
  36. [36]
    RubyGems Common Vulnerabilities and Exposures
    RubyGems Common Vulnerabilities and Exposures. CVE-2013-4287: Algorithmic complexity vulnerability in RubyGems 2.0.7 and older.
  37. [37]
    CVE-2015-3900 Request hijacking vulnerability in RubyGems 2.4.6 ...
    May 14, 2015 · RubyGems versions between 2.0 and 2.4.6 are vulnerable. RubyGems version 2.0.16, 2.2.4, and 2.4.7 have been released that fix this issue.
  38. [38]
    Dependency Hijacking Attack Breaches 35 Companies in Exploit
    Feb 9, 2021 · This attack is of particular significance as unlike traditional typosquatting or brandjacking supply-chain attacks that Sonatype has talked ...
  39. [39]
    CVE-2022-29176 - NVD
    May 5, 2022 · We believe this vulnerability has not been exploited. RubyGems.org sends an email to all gem owners when a gem version is published or yanked.Missing: 29199 | Show results with:29199
  40. [40]
    rubysec/ruby-advisory-db: A database of vulnerable Ruby Gems
    Within each directory are one or more advisory files for the Ruby library. These advisory files are named using the advisories' CVE or GHSA ID.
  41. [41]
    rubysec/bundler-audit: Patch-level verification for Bundler - GitHub
    Bundler-audit provides rake tasks for checking the code and for updating its vulnerability database. Simply add the following code to the Rakefile.
  42. [42]
    Setting up multi-factor authentication - RubyGems Guides
    We highly recommend that you enable MFA for both UI and API. When enabled, this will mean that you need to use MFA for signing into RubyGems.org and when ...
  43. [43]
    RubyGems.org rate limits
    We have rate limits in place for some of our endpoints. Some endpoints may be cached by our CDN at times and therefore, may allow higher request rates.
  44. [44]
    All versions of bundler | RubyGems.org | your community gem host
    All versions of bundler. 417 versions since August 04, 2009: 2.7.2 September 09, 2025 (447 KB); 2.7.1 July 21, 2025 (446 KB); 2.7.0 July 16, 2025 (445 KB); 2.6 ...Bundler 2.6.9 · Bundler 2.6.8 · Bundler 2.4.22 · Bundler 2.5.10
  45. [45]
    bundle install - Bundler
    If this is the first time you run bundle install (and a Gemfile.lock does not exist), Bundler will fetch all remote sources, resolve dependencies and install ...
  46. [46]
    A definitive guide to Ruby gems dependency management - Snyk
    Aug 5, 2022 · RubyGems is the central package registry where third-party, open source Ruby gems are shared as well as the official Ruby package manager, known ...
  47. [47]
    Announcing Bundler 2.0
    Jan 3, 2019 · Announcing Bundler 2.0. by Colby Swandale on Jan 3 2019. The Bundler team is excited to announce the release of Bundler 2.0 ! This release ...
  48. [48]
  49. [49]
  50. [50]
  51. [51]
    GitHub - rbenv/rbenv: Manage your app's Ruby environment
    ### Summary: How rbenv Works with RubyGems for Version Management and Gem Installation
  52. [52]
    GitHub - docker-library/ruby: Docker Official Image packaging for Ruby
    ### Summary: How Ruby Docker Images Support RubyGems for Containerized Gem Installs
  53. [53]
    Ruby in Visual Studio Code
    The Ruby LSP extension in VS Code provides navigation, IntelliSense, semantic syntax highlighting, linting, formatting, and debugging for Ruby development.
  54. [54]
    How to Run Ruby/Rails Commands from the IDE instead of the ...
    Sep 14, 2020 · If you need to execute a command of an arbitrary gem, try to use the Gem Command run configuration. For example, RubyMine does not have a ...
  55. [55]
    Getting Started on Heroku with Ruby
    A step-by-step guide for deploying your first Ruby app and mastering the basics of Heroku.Skip Navigation · Introduction · Deploy the App · Declare App Dependencies
  56. [56]
    GitHub - capistrano/bundler: Bundler support for Capistrano 3.x
    ### Summary of https://github.com/capistrano/bundler