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.


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)


root #emerge --ask dev-ruby/rubygems



user $gem --help
RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help gem_dependencies    gem dependencies file guide
    gem help platforms           gem platforms guide
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 with info about installed gems
  Further information:

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.


user $gem uninstall <gems>


user $gem update <gems>


user $gem list

See also