salt.states.gem

Installation of Ruby modules packaged as gems

A state module to manage rubygems. Gems can be set up to be installed or removed. This module will use RVM or rbenv if they are installed. In that case, you can specify what ruby version and gemset to target.

addressable:
  gem.installed:
    - user: rvm
    - ruby: jruby@jgemset
salt.states.gem.installed(name, ruby=None, gem_bin=None, user=None, version=None, rdoc=False, ri=False, pre_releases=False, proxy=None, source=None)

Make sure that a gem is installed.

name

The name of the gem to install

ruby: None

Only for RVM or rbenv installations: the ruby version and gemset to target.

gem_bin: None

Custom gem command to run instead of the default. Use this to install gems to a non-default ruby install. If you are using rvm or rbenv use the ruby argument instead.

user: None

The user under which to run the gem command

New in version 0.17.0.

versionNone

Specify the version to install for the gem. Doesn't play nice with multiple gems at once

rdocFalse

Generate RDoc documentation for the gem(s).

riFalse

Generate RI documentation for the gem(s).

pre_releasesFalse

Install pre-release version of gem(s) if available.

proxyNone

Use the specified HTTP proxy server for all outgoing traffic. Format: http://hostname[:port]

sourceNone

Use the specified HTTP gem source server to download gem. Format: http://hostname[:port]

salt.states.gem.removed(name, ruby=None, user=None, gem_bin=None)

Make sure that a gem is not installed.

name

The name of the gem to uninstall

gem_binNone

Full path to gem binary to use.

rubyNone

If RVM or rbenv are installed, the ruby version and gemset to use. Ignored if gem_bin is specified.

user: None

The user under which to run the gem command

New in version 0.17.0.

salt.states.gem.sources_add(name, ruby=None, user=None)

Make sure that a gem source is added.

name

The URL of the gem source to be added

ruby: None

For RVM or rbenv installations: the ruby version and gemset to target.

user: None

The user under which to run the gem command

New in version 0.17.0.

salt.states.gem.sources_remove(name, ruby=None, user=None)

Make sure that a gem source is removed.

name

The URL of the gem source to be removed

ruby: None

For RVM or rbenv installations: the ruby version and gemset to target.

user: None

The user under which to run the gem command

New in version 0.17.0.