components/ruby/Solaris/gem.1
author April Chin <april.chin@oracle.com>
Mon, 25 Apr 2011 15:05:59 -0700
changeset 199 b87534be1a76
permissions -rw-r--r--
7023222 move ruby to userland 7032819 ruby 1.8.7-p174 needs a newer patch to build against OpenSSL 1.0.0

'\" t
.\"RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim Weirich and others.
.\"
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\" CDDL HEADER END
.\"
.\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
.\"
.\" gem.1
.\"
.TH gem 1 "16 December 2008"  "" ""
.SH NAME
gem  \-\-  Command-line interface to RubyGems
.SH SYNOPSIS
.B gem
.RB \-h | \-\-help
.PP
.B gem
.RB \-v | \-\-version
.PP
.B gem 
.I command 
[ arguments\.\.\. ]
[ options\.\.\. ]
.SH DESCRIPTION
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 
.I gem 
command. You can install, remove, and query gem packages using the 
.I gem 
command.
 
.SH FEATURES

* 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

.SH OPTIONS
.TP
\fB\-h | \-\-help\fP
Get the basic help message for 
.I gem 
command.

.TP
\fB\-v | \-\-version\fP
Get the version of 
.I gem
command.

.TP
.I command
.sp
.ne 2
.mk
\fBbuild\fP
.in +16n
.rt
Build a gem from a gemspec
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBcert\fP
.in +16n
.rt
Manage RubyGems certificates and signing settings
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBcheck\fP
.in +16n
.rt
Check installed gems
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBcleanup\fP
.in +16n
.rt
Clean up old versions of installed gems in the local repository
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBcontents\fP
.in +16n
.rt
Display the contents of the installed gems
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBdependency\fP
.in +16n
.rt
Show the dependencies of an installed gem
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBenvironment\fP
.in +16n
.rt
Display information about the RubyGems environment
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBfetch\fP
.in +16n
.rt
Download a gem and place it in the current directory
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBgenerate_index\fP
.in +16n
.rt
Generates the index files for a gem server directory
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBhelp\fP
.in +16n
.rt
Provide help on the 'gem' command
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBinstall\fP
.in +16n
.rt
Install a gem into the local repository
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBlist\fP
.in +16n
.rt
Display all gems whose name starts with STRING
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBoutdated\fP
.in +16n
.rt
Display all gems that need updates
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBpristine\fP
.in +16n
.rt
Restores gem directories to pristine condition from files located in the gem cache
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBquery\fP
.in +16n
.rt
Query gem information in local or remote repositories
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBrdoc\fP
.in +16n
.rt
Generates RDoc for pre-installed gems
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBsearch\fP
.in +16n
.rt
Display all gems whose name contains STRING
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBserver\fP
.in +16n
.rt
Documentation and gem repository HTTP server
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBsources\fP
.in +16n
.rt
Manage the sources RubyGems will search for gems
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBspecification\fP
.in +16n
.rt
Display gem specification (in yaml)
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBstale\fP
.in +16n
.rt
List gems along with access times
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBuninstall\fP
.in +16n
.rt
Uninstall gems from the local repository
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBunpack\fP
.in +16n
.rt
Unpack an installed gem to the current directory
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBupdate\fP
.in +16n
.rt
Update the named gem (or all installed gems) in the local repository
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
\fBwhich\fP
.in +16n
.rt
Find the location of a library file you can require
.sp
.sp 1
.in -16n
.sp
.ne 2
.mk
For more detail help on a particular command with its arguments and options,
using 'gem help
.I command
\'.

For example:

        # gem help install

.SH ENVIRONMENT
.TP
.B GEM_HOME
Directory containing the master gem repository.

.TP
.B GEM_PATH
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 separator ':' 

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

.TP
.B 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 first.

.TP
.B make
Name of the make program that should be used to build extensions.

.TP
.B HOME
Home directory of the user (see below).

.TP
.B USERPROFILE
Home directory of the user (used if HOME is not defined)

.TP
.B HOMEDRIVE
Drive containing the user's home directory.

.TP
.B HOMEPATH
Path to the user's home directory.

.SH EXAMPLES
.PP
\fBExample 1: Install 'rake', either from local directory or remote server
.PP
.nf
	# gem install rake
.fi
.PP
\fBExample 2: Install 'rake', only from remote server
.PP
.nf
	# gem install rake --remote
.fi
.PP
\fBExample 3: Install 'rake' from remote server, and run unit tests, and generate RDocs
.PP
.nf
	# gem install --remote rake --test --rdoc --ri
.fi
.PP
\fBExample 4: Install 'rake', but only version 0.3.1, even if dependencies are not met, and into a specific directory
.PP
.nf
	# gem install rake --version 0.3.1 --force --install-dir $HOME/.gems
.fi
.PP
\fBExample 5: List local gems whose name begins with 'D'
.PP
.nf
	# gem list D
.fi
.PP
\fBExample 6: List local and remote gems whose name contains 'log'
.PP
.nf
	# gem search log --both
.fi
.PP
\fBExample 7:  List only remote gems whose name contains 'log'
.PP
.nf
	# gem search log --remote
.fi
.PP
\fBExample 8: Uninstall 'rake'
.PP
.nf
	#  gem uninstall rake
.fi
.PP
\fBExample 9:  See information about RubyGems
.PP
.nf
	# gem environment
.TE
.sp
.SH SEE ALSO
\fBruby\fR(1)
.sp
.SH FILES
The following files specify the installation  locations  for Ruby: 
.PP
.TP
/var/ruby/1.8/gem_home 
Contains the Rubygems repository. Configure the GEM_HOME environment variable to point to /var/ruby/1.8/gem_home as the installation of Rubygems repository.
.PP
.TP
/var/ruby/1.8/gem_home/bin
Contains executables for any installed gems that supply them (i.e.: thin, rake, rails, etc). Only exists after a gem with an executable has been installed.
.PP
.TP
~/.gem/ruby/1.8
Location that gems will be installed to if /var/ruby/1.8/gem_home is not writable by the user. This is automatically added to GEM_PATH.
.PP
.TP
~/.gem/ruby/1.8/bin
Location that executables for gems will be installed to if /var/ruby/1.8/gem_home/bin is not writable by the user.
.PP
.TP
/usr/ruby/1.8/bin 
Contains the Rubygems programs with all other Ruby related programs.  These programs are linked from /usr/bin.
For example: /usr/ruby/1.8/bin/gem is linked from /usr/bin/gem18, and may be linked from /usr/bin/gem if 1.8 is the latest version of Ruby installed on this system.
.PP
.\" Begin Oracle update
.SH NOTES
Source code for RubyGems is available on http://opensolaris.org

Detailed documentation for RubyGems is available at http://docs.rubygems.org/