# RubyGems

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/RubyGems
> Markdown URL: https://mediated.wiki/source/RubyGems.md
> Source: https://en.wikipedia.org/wiki/RubyGems
> Source revision: 1305699118
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Package manager for Ruby

This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources. Find sources: "RubyGems" – news · newspapers · books · scholar · JSTOR (July 2021) (Learn how and when to remove this message)

"Gem (software)" redirects here. For the 1980s desktop, see [GEM (desktop environment)](/source/GEM_(desktop_environment)).

RubyGems Stable release 4.0.15[1] / 23 June 2026; 2 days ago (23 June 2026) Written in Ruby Operating system Cross-platform Type Package manager License Ruby License Website rubygems.org Repository github.com/ruby/rubygems

Total gems 175,000+ Total downloads 202+ billion

**RubyGems** is a [package manager](/source/Package_manager) for the [Ruby programming language](/source/Ruby_programming_language) that provides a standard format for distributing Ruby programs and [libraries](/source/Library_(computing)) (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a [server](/source/Software_repository) for distributing them. It was created by [Chad Fowler](https://en.wikipedia.org/w/index.php?title=Chad_Fowler&action=edit&redlink=1), [Jim Weirich](/source/Jim_Weirich), [David Alan Black](https://en.wikipedia.org/w/index.php?title=David_Alan_Black_(software_developer)&action=edit&redlink=1), [Paul Brannan](https://en.wikipedia.org/w/index.php?title=Paul_Brannan&action=edit&redlink=1) and [Richard Kilmer](/source/Richard_Kilmer) in 2004.[2]

The interface for RubyGems is a [command-line tool](/source/Command-line_tool) called *gem* which can install and manage libraries (the gems).[3] RubyGems integrates with Ruby run-time [loader](/source/Loader_(computing)) to help find and load installed gems from standardized library folders. Though it is possible to use a private RubyGems [repository](/source/Software_repository), the public repository is most commonly used for gem management.

The public repository helps users find gems, resolve [dependencies](/source/Software_dependency) and install them. RubyGems is bundled with the standard Ruby package as of Ruby 1.9.[4]

## History

Development on RubyGems started in November 2003 and was released to the public on March 14, 2004, or [Pi Day](/source/Pi_Day) 2004.[5]

It was created by [Chad Fowler](https://en.wikipedia.org/w/index.php?title=Chad_Fowler&action=edit&redlink=1), [Jim Weirich](/source/Jim_Weirich), [David Alan Black](https://en.wikipedia.org/w/index.php?title=David_Alan_Black_(software_developer)&action=edit&redlink=1), [Paul Brannan](https://en.wikipedia.org/w/index.php?title=Paul_Brannan&action=edit&redlink=1) and [Richard Kilmer](/source/Richard_Kilmer) during RubyConf 2004.[2]

In 2010, the default public repository for gems moved from gems.rubyforge.org to rubygems.org, which is still in use. Also, RubyGems development was moved to [GitHub](/source/GitHub) in 2010. Though RubyGems has existed since Ruby 1.8, it was not a part of the standard Ruby distribution until Ruby 1.9.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

There were 38 releases from 2004 to 2010.[5]

Previously, [compatibility](/source/Software_compatibility) with RubyGems and Ruby varied. Many versions of RubyGems are almost fully incompatible with many versions of Ruby and some versions had key features unusable. For example, Ruby 1.9 came with RubyGems 1.3.7 in its standard distribution, but RubyGems 1.4.x was not compatible with Ruby 1.9. This meant that updating RubyGems on Ruby 1.9 was not possible until RubyGems 1.5.0 was released in 2011, two years after the first stable release of Ruby 1.9.[6] These compatibility issues led to a rapid development of RubyGems, switching to a 4–6 week release schedule, and more version releases.[5]

There were 117 releases from 2011 to 2016. 45 versions were released in 2013, which is the highest number of releases in a year for RubyGems.[5]

## Structure of a gem

Every gem contains a name, version and platform. Gems work only on ruby designed for a particular platform based on [CPU architecture](/source/Computer_architecture) and operating-system type and version.[7]

Each gem consists of:

1. Code

1. Documentation

1. Gem specification (Gemspec)

The code organization follows the following structure for a gem called *gem_name*:

gem_name/
├── bin/
│   └── gem_name
├── lib/
│   └── gem_name.rb
├── test/
│   └── test_gem_name.rb
├── README
├── Rakefile
└── gem_name.gemspec

- The lib directory contains the code for the gem.

- The test (or spec) directory is used for testing.

- Rakefile is used by [Rake](/source/Rake_(software)) to automate tests and to generate code.

- [README](/source/README) includes the documentation, [RDOC](/source/RDoc), for most gems.

- Gem specification (gemspec) contains information about the author of the gem, the time of creation and the purpose the gem serves.

## Security concerns

Since gems run their own code in an application it may lead to various security issues due to installation of malicious gems. The creator of a malicious gem may be able to compromise the user's system or server.[8]

A number of methods have been developed to counter the security threat:

- [Cryptographic signing](/source/Cryptographic_signature) of gems since RubyGems version 0.8.11. The gem cert and gem install commands are used for this purpose.

- New signing models such as [X509](/source/X.509) and [OpenPGP](/source/OpenPGP) have been proposed and are actively being discussed among Ruby experts.

## See also

- [Free and open-source software portal](https://en.wikipedia.org/wiki/Portal:Free_and_open-source_software)

- [Ruby Version Manager](/source/Ruby_Version_Manager)

- [Package manager](/source/Package_manager)

- [pip (package manager)](/source/Pip_(package_manager))

- [npm](/source/Npm)

- [LuaRocks](/source/LuaRocks)

## References

1. **[^](#cite_ref-wikidata-822bdd4a3ace2efb41841d205310b376530c6f6e-v20_1-0)** ["Release 4.0.15"](https://github.com/ruby/rubygems/releases/tag/v4.0.15). 23 June 2026. Retrieved 24 June 2026.

1. ^ [***a***](#cite_ref-A_2018_2-0) [***b***](#cite_ref-A_2018_2-1) ["174 Rubygems with Eric Hodel"](https://web.archive.org/web/20210731060214/https://devchat.tv/ruby-rogues/174-rubygems-with-eric-hodel/). Archived from [the original](https://devchat.tv/ruby-rogues/174-rubygems-with-eric-hodel) on 2021-07-31. Retrieved 2018-05-09.

1. **[^](#cite_ref-B_2016_3-0)** ["RubyGems Command Reference"](http://guides.rubygems.org/command-reference/). *guides.rubygems.org*. Retrieved 2016-09-18.

1. **[^](#cite_ref-C_2022_4-0)** ["Ruby 1.9.1 changelog"](https://web.archive.org/web/20220117234323/https://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_0/NEWS). Archived from [the original](http://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_0/NEWS) on 2022-01-17.

1. ^ [***a***](#cite_ref-:0_5-0) [***b***](#cite_ref-:0_5-1) [***c***](#cite_ref-:0_5-2) [***d***](#cite_ref-:0_5-3) ["Version history of RubyGems"](https://github.com/rubygems/rubygems/blob/master/History.txt). *GitHub*. Retrieved 2016-09-18.

1. **[^](#cite_ref-D_2009_6-0)** ["Ruby 1.9.1 released"](https://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/). *www.ruby-lang.org*. Retrieved 2016-09-18.

1. **[^](#cite_ref-E_2016_7-0)** ["What is a gem? - RubyGems.org"](http://guides.rubygems.org/what-is-a-gem/). *guides.rubygems.org*. Retrieved 2016-09-18.

1. **[^](#cite_ref-F_2016_8-0)** ["Security - RubyGems Guides"](https://guides.rubygems.org/security/). *guides.rubygems.org*. Retrieved 2016-09-23.

## External links

- [Official website](https://rubygems.org)

- [Linux Journal article](https://www.linuxjournal.com/article/8967)

v t e Ruby programming language Implementations Active Ruby MRI; YARV mruby JRuby RubyMotion Discontinued MacRuby IronRuby XRuby HotRuby MagLev Rubinius IDE Aptana Studio Komodo IDE RubyMine Applications Capistrano Hackety Hack Interactive Ruby Shell Pry Rake Redmine RSpec RubyGems RVM Chef Puppet Vagrant Homebrew CocoaPods Libraries, frameworks Adhearsion eRuby (RHTML) Merb Padrino RubyCocoa Ruby on Rails Shoes Sinatra QtRuby Server software mod_ruby Mongrel Phusion Passenger (mod_rails/mod_rack) Rack WEBrick People Yukihiro Matsumoto David Heinemeier Hansson why the lucky stiff Dave Thomas Other Document format why's (poignant) Guide to Ruby RGSS Ruby Central RubyKaigi RubyForge Ruby License List of Ruby software and tools Commons Category

---
Adapted from the Wikipedia article [RubyGems](https://en.wikipedia.org/wiki/RubyGems) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/RubyGems?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
