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, 2015, Oracle and/or its affiliates. All rights reserved.
gem.1
gem -v | --version
gem command [ arguments\.\.\. ] [ options\.\.\. ]
-h | --help Get the basic help message for gem command.
-v | --version Get the version of gem command.
command
build Build a gem from a gemspec
cert Manage RubyGems certificates and signing settings
check Check a gem repository for added or missing files
cleanup Clean up old versions of installed gems
contents Display the contents of the installed gems
dependency Show the dependencies of an installed gem
environment Display information about the RubyGems environment
fetch Download a gem and place it in the current 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
list Display local gems whose name starts with STRING
lock Generate a lockdown list of gems
mirror Mirror all gem files (requires rubygems-mirror)
outdated Display all gems that need updates
owner Manage gem owners of a gem on the push server
pristine Restores installed gems to pristine condition from files located in the gem cache
push Push a gem up to the gem server
query Query gem information in local or remote repositories
rdoc Generates RDoc for pre-installed gems
search Display remote gems whose name contains STRING
server Documentation and gem repository HTTP server
sources Manage the sources and cache file RubyGems will search for gems
specification Display gem specification (in yaml)
stale List gems along with access times
uninstall Uninstall gems from the local repository
unpack Unpack an installed gem to the current directory
update Update installed gems to the latest version
which Find the location of a library file you can require
yank Remove a pushed gem from the index
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 unambiguous. e.g. 'gem i thor' is short for 'gem install thor'.
GEM_HOME Directory containing the master gem repository.
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 ':'
GEM_SKIP List of gems should should not be loaded (normally used for development). The list should be delimited by the appropriate path separator ':'
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.
make Name of the make program that should be used to build extensions.
HOME Home directory of the user (see below).
USERPROFILE Home directory of the user (used if HOME is not defined)
HOMEDRIVE Drive containing the user's home directory.
HOMEPATH 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/RUBY_LIB_VER
Example 5: List local gems whose name begins with 'D'
# gem list D
Example 6: List local and remote gems whose name contains 'log'
# 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 .TESEE ALSOruby(1)FILESThe following files specify the installation locations for Ruby:
/usr/ruby/RUBY_VER/lib/ruby/gems/RUBY_LIB_VER Default installation location for Ruby gems
~/.gem/ruby/RUBY_LIB_VER Per user location to install gems. This is automatically added to GEM_PATH.
/usr/ruby/RUBY_VER/lib/ruby/vendor_ruby/gems/RUBY_LIB_VER Location of gems installed by Solaris packages.
~/.gem/ruby/RUBY_LIB_VER/bin Per user location for gem executables.
/usr/ruby/RUBY_VER/bin Contains the Rubygems program with all other Ruby related programs. These programs are linked from /usr/bin. For example: /usr/ruby/RUBY_VER/bin/gem is linked 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, etc).
NOTESDetailed documentation for RubyGems is available at http://guides.rubygems.org/