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 wi ...
for the
Ruby programming language Ruby is a general-purpose programming language. It was designed with an emphasis on programming productivity and simplicity. In Ruby, everything is an object, including primitive data types. It was developed in the mid-1990s by Yukihiro "Mat ...
that provides a standard format for distributing Ruby programs and
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
(in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a
server Server may refer to: Computing *Server (computing), a computer program or a device that provides requested information for other programs or devices, called clients. Role * Waiting staff, those who work at a restaurant or a bar attending custome ...
for distributing them. It was created by Chad Fowler, Jim Weirich, David Alan Black, Paul Brannan and Richard Kilmer in 2004. The interface for RubyGems is a
command-line tool A console application or command-line program is a computer program (applications or utilities) designed to be used via a text-only user interface. A console application can be used with a computer terminal, a system console, or a terminal emu ...
called ''gem'' which can install and manage libraries (the gems). RubyGems integrates with Ruby run-time
loader Loader can refer to: * Loader (equipment) * Loader (computing) ** LOADER.EXE, an auto-start program loader optionally used in the startup process of Microsoft Windows ME * Loader (surname) * Fast loader * Speedloader * Boot loader ** LOADER.COM ...
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), an ...
, 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 (the 3rd month) since 3, 1, and 4 are the first three significant figures of , and was first celebrated in the United States. It was founded i ...
2004. It was created by Chad Fowler, Jim Weirich, David Alan Black, Paul Brannan and Richard Kilmer during RubyConf 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 () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
in 2010. Though RubyGems has existed since Ruby 1.8, it was not a part of the standard Ruby distribution until Ruby 1.9. There were 38 releases from 2004 to 2010. Previously,
compatibility Compatibility may refer to: Computing * Backward compatibility, in which newer systems can understand data generated by older ones * Compatibility card, an expansion card for hardware emulation of another device * Compatibility layer, componen ...
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, and more version releases. 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.


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 In computer science and computer engineering, computer architecture is a description of the structure of a computer system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a mo ...
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: Common meanings * Rake (tool), a horticultural implement, a long-handled tool with tines * Rake (stock character), a man habituated to immoral conduct * Rake (poker), the commission taken by the house when hosting a poker game ...
to automate tests and to generate code. *
README In software distribution and software development, a README file (computing), file contains information about the other files in a directory (file systems), directory or archive (computing), archive of computer software. A form of Software doc ...
includes the documentation,
RDOC RDoc, designed by Dave Thomas, is an embedded documentation generator for the Ruby programming language. It analyzes Ruby source code, generating a structured collection of pages for Ruby objects and methods. Code comments can be added in a ...
, 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 Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partit ...
have been proposed and are actively being discussed among Ruby experts.


See also

*
Ruby Version Manager Ruby Version Manager, often abbreviated as RVM, is a software platform for Unix-like operating systems designed to manage multiple installations of Ruby on the same device. The entire Ruby environment including the Ruby interpreter, installed ...
*
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 wi ...
*
pip (package manager) pip (also known by Python 3's alias pip3) 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 ...
* npm * LuaRocks


References


External links

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