LinuxCommandLibrary

gem

frontend to RubyGems, the Ruby package manager

TLDR

Search for remote gem(s) and show all available versions

$ gem search [regular_expression] --all
copy


Install the latest version of a gem
$ gem install [gem_name]
copy


Install a specific version of a gem
$ gem install [gem_name] --version [1.0.0]
copy


Install the latest matching (SemVer) version of a gem
$ gem install [gem_name] --version '~> [1.0]'
copy


Update a gem
$ gem update [gem_name]
copy


List all local gems
$ gem list
copy


Uninstall a gem
$ gem uninstall [gem_name]
copy


Uninstall a specific version of a gem
$ gem uninstall [gem_name] --version [1.0.0]
copy

Help

RubyGems is a package manager for Ruby. 

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

  Examples: 
    gem install rake 
    gem list --local 
    gem build package.gemspec 
    gem push package-0.0.1.gem 
    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            show help on COMMAND 
                                   (e.g. 'gem help install') 
    gem server                   present a web page at 
                                 http://localhost:8808/ 
                                 with info about installed gems 
  Further information: 
    https://guides.rubygems.org 

Copied to clipboard