ruby /rubygems
Library packaging and distribution for Ruby.
★ 3,996⑂ 1,981👁 167⑃ 5,994● 3,738▤ 506
More from this author
-1
Daily
+1
Weekly
3,996
stars
1,981
forks
167
watchers
5,994
prs
3,738
issues
506
releases
README
RubyGems
RubyGems is a package management framework for Ruby.
A package (also known as a library) contains a set of functionality that can be invoked by a Ruby program, such as reading and parsing an XML file.
We call these packages "gems" and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment.
RubyGems is also a client for RubyGems.org, a public repository of Gems that allows you to publish a Gem
that can be shared and used by other developers. See our guide on publishing a Gem at guides.rubygems.org
Getting Started
Installing and managing a Gem is done through the gem command. To install a Gem such as [Faraday][faraday]:
bash
gem install faraday
[faraday]: https://github.com/lostisland/faraday?tab=readme-ov-file
RubyGems will download the Faraday Gem from RubyGems.org and install it into your Ruby environment.
Finally, inside your Ruby program, load the Faraday gem and start hacking:
ruby
require 'faraday'
response = Faraday.get('https://rubygems.org')
do something with response...
For more information about how to use RubyGems, see our RubyGems basics guide at guides.rubygems.org
Bundler
Bundler makes sure Ruby applications run the same code on every machine. It is developed in this repository and ships with Ruby.
It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
For example, these commands will allow you to use Bundler to manage the rspec gem for your application:
bash
bundle init
bundle add rspec
bundle install
bundle exec rspec
For more information about how to use Bundler, see the guides at guides.rubygems.org
Requirements
RubyGems supports Ruby 3.0 or later.
Installation
RubyGems is already installed in your Ruby environment, you can check the version you have installed by running gem --version in your terminal emulator.
In some cases Ruby & RubyGems may be provided as OS packages. This is not a
recommended way to use Ruby & RubyGems. It's better to use a Ruby Version
Manager, such as rbenv or
chruby. If you still want to use the
version provided by your OS package manager, please also use your OS package
manager to upgrade rubygems, and disregard any other installation instructions
given below.
If you would like to manually install RubyGems:
Download from https://rubygems.org/pages/download, unpack, and cd into RubyGems' src
OR clone this repository and cd into the repository
Install RubyGems by running:
$ ruby setup.rb
For more detailsTop issues
#1746Feature: gem aliases/provides/replaces42 comments · 2016-10-11#1811Feature Request: Optional dependency version specifier32 comments · 2017-01-05#1376Support long file/path names for TarWriter/TarReader22 comments · 2015-11-07#9259Proposal: Maintainable binary gem ecosystem20 comments · 2026-01-22#1506We still need an alternative to yank -- how about 'hide'?20 comments · 2016-02-24#9542RubyGems: Adding post-quantum cryptography (PQC) support19 comments · 2026-05-13#1296Standardize +requirements+ field from the specification19 comments · 2015-06-26#8422Bundler fails inside rake task14 comments · 2025-01-19
Discussions
#9902Gem.load_plugins loads same plugin multiple times from different Gem.path entries2 comments · 2026-09-23#9785Suggestion: Add cooldown support to `Gem.latest_version_for`1 comments · 2026-08-18#9609Accept menu selection on a single keypress in bundle show/info/open0 comments · 2026-06-10#9494Proposal: override DSL in Gemfile for managing version constraints3 comments · 2026-04-20#9350bundle install issue against Ruby 3.4.2-1-x64 https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.4.2-1/rubyinstaller-devkit-3.4.2-1-x64.exe0 comments · 2026-02-24#9334https://bundler.io/ state is pretty sad.... It needs some ❤️1 comments · 2026-02-16#9330Error in locating ruby 3.3.8 and 'https://rubygems.org' in my folder1 comments · 2026-02-12#9351Failed to install debase under CI1 comments · 2026-02-09
Latest release
v4.1.1 v4.1.1 2026-11-25RubyGems Enhancements: Installs bundler 4.1.1 as a default gem. Bug fixes: Fix file permissions during gem extraction. Pull request 10128 by Hiroshi SHIBATA Resolve chained symlink targets before creating them during extraction. Pull request 10119 by Hiroshi SHIBATA Keep negative any terms when PubGrub resolves conflicts. Pull request 10112 by Hiroshi SHIBATA Serialize concurrent installs of the same gem. Pull request 10107 by Hiroshi SHIBATA Keep resolved prereleases when sorting install requests. Pull request 10100 by Hiroshi SHIBATA Forward keyword arguments in the IPv4 fallbac