man pages section 1: User Commands

Exit Print View

Updated: July 2014

gem (1)


gem - line interface to RubyGems


gem -h|--help

gem -v|--version

gem command [ arguments... ] [ options... ]


SunOS 5.11                                                      1

User Commands                                              gem(1)

     gem  --  Command-line interface to RubyGems

     gem -h|--help

     gem -v|--version

     gem command [ arguments... ] [ options... ]

     A  gem  is  a  packaged  Ruby  application or library, while
     RubyGems is the premier ruby packaging system which is  used
     to manage gems.

     Gems are managed on your computer using the gem command. You
     can install, remove, and query gem packages  using  the  gem

     *  Easy  Installation  and  removal of RubyGems packages and
     their dependencies

     * Management and control of local packages

     * Package dependency management

     * Query, search and list local and remote packages

     * Multiple version support for installed packages

     * Web-based interface to view  the  documentation  for  your
     installed gems

     * Easy to use interface for building gem packages

     * Simple server for distributing your own gem packages

     -h | --help
          Get the basic help message for gem command.

     -v | --version
          Get the version of gem command.


SunOS 5.11           Last change: 3 June 2013                   1

User Commands                                              gem(1)

          build           Build a gem from a gemspec

          cert            Manage  RubyGems certificates and sign-
                          ing settings

          check           Check installed gems

          cleanup         Clean up old versions of installed gems
                          in the local repository

          contents        Display  the  contents of the installed

          dependency      Show the dependencies of  an  installed

          environment     Display  information about the RubyGems

          fetch           Download a gem and place it in the cur-
                          rent directory

          generate_index  Generates  the  index  files  for a gem
                          server directory

          help            Provide help on the 'gem' command

          install         Install a gem into the local repository

SunOS 5.11           Last change: 3 June 2013                   2

User Commands                                              gem(1)

          list            Display all gems whose name starts with

          lock            Generate a lockdown list of gems

          mirror          Mirror a gem repository

          outdated        Display all gems that need updates

          pristine        Restores  installed  gems  to  pristine
                          condition from files located in the gem

          query           Query  gem  information  in  local   or
                          remote repositories

          rdoc            Generates RDoc for pre-installed gems

          search          Display  all  gems  whose name contains

          server          Documentation and gem  repository  HTTP

          sources         Manage   the  sources  and  cache  file
                          RubyGems will search for gems

          specification   Display gem specification (in yaml)

SunOS 5.11           Last change: 3 June 2013                   3

User Commands                                              gem(1)

          stale           List gems along with access times

          uninstall       Uninstall gems from the  local  reposi-

          unpack          Unpack  an installed gem to the current

          update          Update the named gem (or all  installed
                          gems) in the local repository

          which           Find the location of a library file you
                          can require

          For more detailed help on a particular command with its
          arguments and options, use 'gem help command '.

          For example:

                  # gem help install

          Commands  may be abbreviated, so long as they are unam-
          biguous.  e.g. 'gem i thor' is short for  'gem  install

          Directory containing the master gem repository.

          Path list of directories containing gem repositories to
          be searched in addition to the GEM_HOME directory.  The
          list  should be delimited by the appropriate path sepa-
          rator ':'

          List of gems should should not be loaded (normally used
          for  development).  The list should be delimited by the
          appropriate path separator ':'

SunOS 5.11           Last change: 3 June 2013                   4

User Commands                                              gem(1)

     http_proxy / HTTP_PROXY
          URL of the HTTP protocol proxy to be used to get out of
          the  firewall.  The  lower  case  version  will be used

     make Name of the make program that should be used  to  build

     HOME Home directory of the user (see below).

          Home  directory  of  the  user  (used  if  HOME  is not

          Drive containing the user's home directory.

          Path to the user's home directory.

     Example 1: Install 'thor', either from  local  directory  or
     remote server

          # gem install thor

     Example 2: Install 'thor', only from remote server

          # gem install thor --remote

     Example  3:  Install 'thor' from remote server, and run unit
     tests, and generate RDocs

          # gem install --remote thor --test --rdoc --ri

     Example 4: Install 'thor', but only version 0.18.1, even  if
     dependencies are not met, and into a specific directory

          # gem install thor --version 0.18.1 --force --install-dir $HOME/.gem/ruby/1.9.1

     Example 5: List local gems whose name begins with 'D'

          # gem list D

     Example  6:  List  local and remote gems whose name contains

SunOS 5.11           Last change: 3 June 2013                   5

User Commands                                              gem(1)

          # gem search log --both

     Example 7:  List only remote gems whose name contains 'log'

          # gem search log --remote

     Example 8: Uninstall 'thor'

          #  gem uninstall thor

     Example 9:  See information about RubyGems

          # gem environment

     See  attributes(5)  for  descriptions   of   the   following

     |Availability   | runtime/ruby-19  |
     |Stability      | Uncommitted      |

     The following files specify the installation  locations  for

          Contains  the  Rubygems   repository.   Configure   the
          GEM_HOME    environment    variable    to    point   to
          /usr/ruby/1.9/lib/sparcv9/ruby/gems/1.9.1    as     the
          installation of Rubygems repository.

          Per  user  location  to install gems. This is automati-
          cally added to GEM_PATH.

          Per user location for gem executables.

          Contains the  Rubygems  program  with  all  other  Ruby
          related  programs.   These  programs  are  linked  from
          /usr/bin.  For example: /usr/ruby/1.9/bin/gem is linked

SunOS 5.11           Last change: 3 June 2013                   6

User Commands                                              gem(1)

          from   /usr/bin/gem19,   and   may   be   linked   from
          /usr/bin/gem if the package mediator "ruby" is  version
          "RUBY_VER" (see pkg(1)).  Also contains executables for
          any installed gems that supply them (i.e.: thor, rails,

     Detailed   documentation   for   RubyGems  is  available  at

     This  software  was   built   from   source   available   at    The  original
     community  source  was  downloaded  from    http://ftp.ruby-

     Further  information about this software can be found on the
     open source community website at

SunOS 5.11           Last change: 3 June 2013                   7