RubyGems - Ruby Package Utility 

RubyGems is a package utility for Ruby, which installs Ruby software packages and keeps them up-to-date.
$ gem command [arguments...] [options...]

Check to see whether RubyGems is installed −
$ gem --version
0.9.0
Here is a list of all important commands for RubyGems −
build
Builds a gem from a gemspec.
cert
Adjusts RubyGems certificate settings.
check
Checks installed gems.
cleanup
Cleans up old versions of installed gems in the local repository.
contents
Displays the contents of the installed gems.
dependency
Shows the dependencies of an installed gem.
environment
Displays RubyGems environmental information.
help
Provides help on the 'gem' command.
install
Installs a gem into the local repository.
list
Displays all gems whose name starts with STRING.
query
Queries gem information in local or remote repositories.
rdoc
Generates RDoc for pre-installed gems.
search
Displays all gems whose name contains STRING.
specification
Displays gem specification (in yaml).
uninstall
Uninstalls a gem from the local repository.
unpack
Unpacks an installed gem to the current directory.
update
Updates the named gem (or all installed gems) in the local repository.
Following is the list of common options −
--source URL
Uses URL as the remote source for gems.
-p, --[no-]http-proxy [URL]
Uses HTTP proxy for remote operations.
-h, --help 
Gets help on this command.
--config-file FILE
Uses this config file instead of default.
--backtrace
Shows stack backtrace on errors.
--debug
Turns on Ruby debugging.
This is a list of the options, which use most of the time when you use RubyGems while installing any Ruby package −
-v, --version VERSION
Specifies version of gem to install.
-l, --local 
Restricts operations to the LOCAL domain (default).
-r, --remote
Restricts operations to the REMOTE domain.
-b, --both
Allows LOCAL and REMOTE operations.
 -i, --install-dir DIR
Where to install.
-d, --[no-]rdoc
Generates RDoc documentation for the gem on install.
-f, --[no-]force
Forces gem to install, bypassing dependency checks.
-t, --[no-]test
Runs unit tests prior to installation.
-w, --[no-]wrappers
Uses bin wrappers for executables.
-P, --trust-policy POLICY
Specifies gem trust policy.
--ignore-dependencies
Do not install any required dependent gems.
-y, --include-dependencies
Unconditionally installs the required dependent gems.
This will install 'SOAP4R', either from local directory or remote server including all the dependencies −
gem install soap4r --include-dependencies

This will install 'rake', only from remote server −
gem install rake --remote

This will install 'rake' from remote server, and run unit tests, and generate RDocs −
gem install --remote rake --test --rdoc --ri

The RubyGems User Guide gives you almost everything you need to know about using RubyGems.
The RubyGems User Guide gives you almost everything you need to know about using RubyGems.
The RubyGems Command Reference for RubyGems.
The RubyGems Command Reference for RubyGems.

    46 Lectures 
     9.5 hours 

 Eduonix Learning Solutions

    97 Lectures 
     7.5 hours 

 Skillbakerystudios

    227 Lectures 
     40 hours 

 YouAccel

    19 Lectures 
     10 hours 

 Programming Line

    51 Lectures 
     5 hours 

 Stone River ELearning

    39 Lectures 
     4.5 hours 

 Stone River ELearning
 Print
 Add Notes
 Bookmark this page