RubyGems

From Wikipedia, the free encyclopedia
  (Redirected from Rubygems)
Jump to: navigation, search
RubyGems
Stable release 1.8.15 / January 6, 2012; 54 days ago (2012-01-06)
Written in Ruby
Operating system Cross-platform
Type Package manager
License Ruby License
Website http://rubygems.org

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.

Contents

[edit] Gems

Gems are packages similar to Ebuilds. 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.

[edit] Gem Command

The gem command is used to build, upload, download, and install Gem packages.

[edit] 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

[edit] 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

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages