Rubygems
   HOME

TheInfoList



OR:

RubyGems is a
package manager A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner. A package manager deals w ...
for the Ruby programming language that provides a standard format for distributing Ruby programs and
libraries A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
(in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them. It was created by
Chad Fowler Chad (; ar, تشاد , ; french: Tchad, ), officially the Republic of Chad, '; ) is a landlocked country at the crossroads of North and Central Africa. It is bordered by Libya to the north, Sudan to the east, the Central African Republic ...
,
Jim Weirich James Nolan Weirich (November 18, 1956 – February 19, 2014) was a software developer, speaker, teacher, and contributor to the Ruby programming language community. He was active in the Ruby community worldwide, speaking at events in Asia, Sou ...
,
David Alan Black David Alan Black (born 9 June 1952, Honolulu, Hawaii) is Professor of New Testament and Greek and the Dr. M. O. Owens Jr. Chair of New Testament Studies at the Southeastern Baptist Theological Seminary. He specialises in New Testament Greek gram ...
,
Paul Brannan Paul may refer to: *Paul (given name), a given name (includes a list of people with that name) * Paul (surname), a list of people People Christianity *Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chri ...
and
Richard Kilmer Richard Kilmer (born Hemet, California, 1969) is a technology entrepreneur, software programmer and conference host and speaker in the open-source software community. He is an open-source contributor and developer of commercial software applic ...
during RubyConf 2004. The interface for RubyGems is a
command-line tool A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
called ''gem'' which can install and manage libraries (the gems). RubyGems integrates with Ruby run-time loader to help find and load installed gems from standardized library folders. Though it is possible to use a private RubyGems
repository Repository may refer to: Archives and online databases * Content repository, a database with an associated set of data management tools, allowing application-independent access to the content * Disciplinary repository (or subject repository), a ...
, the public repository is most commonly used for gem management. The public repository helps users find gems, resolve dependencies and install them. RubyGems is bundled with the standard Ruby package as of Ruby 1.9.


History

Development on RubyGems started in November 2003 and was released to the public on March 14, 2004, or
Pi Day Pi Day is an annual celebration of the mathematical constant (pi). Pi Day is observed on March 14 (3/14 in the ''month/day'' format) since 3, 1, and 4 are the first three significant figures of . It was founded in 1988 by Larry Shaw, an e ...
2004. 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 GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
in 2010. Though RubyGems has existed since Ruby 1.8, it was not a part of the standard Ruby distribution until Ruby 1.9. Previously,
compatibility Compatibility may refer to: Computing * Backward compatibility, in which newer devices can understand data generated by older devices * Compatibility card, an expansion card for hardware emulation of another device * Compatibility layer, compon ...
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. These compatibility issues led to a rapid development of RubyGems, switching to a 4–6 week release schedule. This is reflected in there being 38 releases from 2004 to 2010 and 117 releases from 2011 to 2016. 45 versions were released in 2013, which is the highest number of releases in a year for RubyGems.


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 and operating-system type and version. Each gem consists of: # Code # Documentation # 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 Rake may refer to: * Rake (stock character), a man habituated to immoral conduct * Rake (theatre), the artificial slope of a theatre stage Science and technology * Rake receiver, a radio receiver * Rake (geology), the angle between a feature on a ...
to automate tests and to generate code. *
README "\n\n\n\n\n\n''README.txt: A Memoir'' is a 2022 memoir by Chelsea Manning. It covers her early life, experience as a soldier in the U.S. Army, and life and imprisonment after she leaked classified information to WikiLeaks WikiLeaks () is an ...
includes the documentation, 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. A number of methods have been developed to counter the security threat: * Cryptographic signing 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 and OpenPGP have been proposed and are actively being discussed among Ruby experts.


See also

* Ruby Version Manager *
Package manager A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner. A package manager deals w ...
*
Pip (package manager) Pip is a package-management system written in Python and is used to install and manage software packages. The Python Software Foundation recommends using pip for installing Python applications and its dependencies during deployment. Pip c ...
*
Npm (software) npm (Pseudo-acronym, originally short for Node Package Manager) is a package manager for the JavaScript programming language maintained by npm, Inc., npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js. I ...
* LuaRocks


References


External links

*
Linux Journal article
{{DEFAULTSORT:Rubygems Free package management systems Free software programmed in Ruby