RubyGems
Encyclopedia
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (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 is analogous to EasyInstall
for the Python programming language. RubyGems is now part of the standard library from Ruby version 1.9.
s. They contain package information along with files to install.
Gems are usually built from ".gemspec" files, which are YAML
files containing information on Gems. However, Gems may be built by Ruby code directly, too. Such a practice is usually used with Rake
.
The
RubyGems is very similar to apt-get, portage, and yum in functionality.
Installation:
gem install mygem
Uninstallation:
gem uninstall mygem
Listing installed gems:
gem list --local
Listing available gems, e.g.:
gem list --remote
Create RDoc documentation for all gems:
gem rdoc --all
Download but do not install a gem:
gem fetch mygem
Search available gems, e.g.:
gem search STRING --remote
Build .gem from a .gemspec file:
gem build mygem.gemspec
EasyInstall
EasyInstall is a package manager for the Python programming language that provides a standard format for distributing Python programs and libraries . easy_install is a module bundled with setuptools, a third-party library meant to enhance the Python standard library's distutils...
for the Python programming language. RubyGems is now part of the standard library from Ruby version 1.9.
Gems
Gems are packages similar to EbuildEbuild
An ebuild is a specialized bash script format created by the Gentoo Linux project for use in its Portage software management system, which automates compilation and installation procedures for software packages....
s. They contain package information along with files to install.
Gems are usually built from ".gemspec" files, which are YAML
YAML
YAML is a human-readable data serialization format that takes concepts from programming languages such as C, Perl, and Python, and ideas from XML and the data format of electronic mail . YAML was first proposed by Clark Evans in 2001, who designed it together with Ingy döt Net and Oren Ben-Kiki...
files containing information on Gems. However, Gems may be built by Ruby code directly, too. Such a practice is usually used with Rake
Rake (software)
Rake is a software task management tool. It allows you to specify tasks and describe dependencies as well as to group tasks in a namespace.It is similar to SCons and make, but has a number of differences. The tool is written in the Ruby programming language, and the Rakefiles use Ruby syntax...
.
Gem
Command
The gem
command is used to build, upload, download, and install Gem packages. Gem
Usage
RubyGems is very similar to apt-get, portage, and yum in functionality.Installation:
gem install mygem
Uninstallation:
gem uninstall mygem
Listing installed gems:
gem list --local
Listing available gems, e.g.:
gem list --remote
Create RDoc documentation for all gems:
gem rdoc --all
Download but do not install a gem:
gem fetch mygem
Search available gems, e.g.:
gem search STRING --remote
Gem Package Building
The gem command may also be used to build and maintain .gemspec and .gem files.Build .gem from a .gemspec file:
gem build mygem.gemspec