22.16.62. salt.modules.gem

Manage ruby gems.

salt.modules.gem.install(gems, ruby=None, runas=None, version=None, rdoc=False, ri=False, proxy=None)

Installs one or several gems.

gems
The gems to install
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.
version : None
Specify the version to install for the gem. Doesn't play nice with multiple gems at once
rdoc : False
Generate RDoc documentation for the gem(s).
ri : False
Generate RI documentation for the gem(s).
proxy : None
Use the specified HTTP proxy server for all outgoing traffic. Format: http://hostname[:port]

CLI Example:

salt '*' gem.install vagrant
salt.modules.gem.list(prefix='', ruby=None, runas=None)

List locally installed gems.

prefix :
Only list gems when the name matches this prefix.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.list
salt.modules.gem.sources_add(source_uri, ruby=None, runas=None)

Add a gem source.

source_uri
The source URI to add.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.sources_add http://rubygems.org/
salt.modules.gem.sources_list(ruby=None, runas=None)

List the configured gem sources.

ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.sources_list
salt.modules.gem.sources_remove(source_uri, ruby=None, runas=None)

Remove a gem source.

source_uri
The source URI to remove.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.sources_remove http://rubygems.org/
salt.modules.gem.uninstall(gems, ruby=None, runas=None)

Uninstall one or several gems.

gems
The gems to uninstall.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.uninstall vagrant
salt.modules.gem.update(gems, ruby=None, runas=None)

Update one or several gems.

gems
The gems to update.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.update vagrant
salt.modules.gem.update_system(version='', ruby=None, runas=None)

Update rubygems.

version : (newest)
The version of rubygems to install.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
runas : None
The user to run gem as.

CLI Example:

salt '*' gem.update_system

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.61. salt.modules.freebsdservice

Next topic

22.16.63. salt.modules.genesis

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.