# 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 if it is 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, runas=None, user=None, version=None, rdoc=False, ri=False)

  Make sure that a gem is installed.

  name
    The name of the gem to install
  ruby: None
    For RVM installations: the ruby version and gemset to target.
  runas: None

    The user under which to run the `gem` command

    Deprecated since version 0.17.0.

  user: None

    The user under which to run the `gem` command

    New in version 0.17.0.

  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).

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

  Make sure that a gem is not installed.

  name
    The name of the gem to uninstall
  ruby: None
    For RVM installations: the ruby version and gemset to target.
  runas: None

    The user under which to run the `gem` command

    Deprecated since version 0.17.0.

  user: None

    The user under which to run the `gem` command

    New in version 0.17.0.

Current Salt release: 0.17.1

### Table Of Contents

- salt.states.gem
  - Installation of Ruby modules packaged as gems.

#### Previous topic

salt.states.file

#### Next topic

salt.states.git

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd