Gem

From Gentoo Wiki
Jump to:navigation Jump to:search

Gems are programs and libraries for the Ruby programming language. They are distributed by Ruby's package manager, which is called RubyGems, which is accessed by the gem command.

This page is meant to be Ruby equivalent of Python's pip page.

Installation

The gem command is installed with the RubyGems package, which will be installed to support the Ruby programming language. It is not advised to install RubyGems to the system's world set. See the Ruby article for more information.

USE flags

USE flags for dev-ruby/rubygems Centralized Ruby extension management system

server Install support for the rubygems server
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

Emerge

root #emerge --ask dev-ruby/rubygems

Usage

Invocation

user $gem --help

Gem installation

To install a package using the gem command, where gems is the desired gems:

user $gem install <gems>

View gem's environment

The following command can be used to query gem installation paths and other useful information:

user $gem env

See the Application level package management article for best practices and information on adding gem binaries the user's PATH.

Removal

user $gem uninstall <gems>

Update

user $gem update <gems>

List

user $gem list

See also