# salt.states.rvm

## Managing Ruby installations and gemsets with Ruby Version Manager (RVM).

This module is used to install and manage ruby installations and gemsets with RVM, the Ruby Version Manager. Different versions of ruby can be installed and gemsets created. RVM itself will be installed automatically if it's not present. This module will not automatically install packages that RVM depends on or ones that are needed to build ruby. If you want to run RVM as an unprivileged user (recommended) you will have to create this user yourself. This is how a state configuration could look like:

    rvm:
      group:
        - present
      user.present:
        - gid: rvm
        - home: /home/rvm
        - require:
          - group: rvm

    rvm-deps:
      pkg.installed:
        - names:
          - bash
          - coreutils
          - gzip
          - bzip2
          - gawk
          - sed
          - curl
          - git-core
          - subversion

    mri-deps:
      pkg.installed:
        - names:
          - build-essential
          - openssl
          - libreadline6
          - libreadline6-dev
          - curl
          - git-core
          - zlib1g
          - zlib1g-dev
          - libssl-dev
          - libyaml-dev
          - libsqlite3-0
          - libsqlite3-dev
          - sqlite3
          - libxml2-dev
          - libxslt1-dev
          - autoconf
          - libc6-dev
          - libncurses5-dev
          - automake
          - libtool
          - bison
          - subversion
          - ruby

    jruby-deps:
      pkg.installed:
        - names:
          - curl
          - g++
          - openjdk-6-jre-headless

    ruby-1.9.2:
      rvm.installed:
        - default: True
        - user: rvm
        - require:
          - pkg: rvm-deps
          - pkg: mri-deps
          - user: rvm

    jruby:
      rvm.installed:
        - user: rvm
        - require:
          - pkg: rvm-deps
          - pkg: jruby-deps
          - user: rvm

    jgemset:
      rvm.gemset_present:
        - ruby: jruby
        - user: rvm
        - require:
          - rvm: jruby

    mygemset:
      rvm.gemset_present:
        - ruby: ruby-1.9.2
        - user: rvm
        - require:
          - rvm: ruby-1.9.2

`salt.states.rvm.` `gemset_present`(name, ruby='default', runas=None, user=None)

  Verify that the gemset is present.

  name
    The name of the gemset.
  ruby: default
    The ruby version this gemset belongs to.
  runas: None

    The user to run rvm as.

    Deprecated since version 0.17.0.

  user: None

    The user to run rvm as.

    New in version 0.17.0.

`salt.states.rvm.` `installed`(name, default=False, runas=None, user=None)

  Verify that the specified ruby is installed with RVM. RVM is installed when necessary.

  name
    The version of ruby to install
  default : False
    Whether to make this ruby the default.
  runas: None

    The user to run rvm as.

    Deprecated since version 0.17.0.

  user: None

    The user to run rvm as.

    ..versionadded:: 0.17.0

Current Salt release: 0.17.1

### Table Of Contents

- salt.states.rvm
  - Managing Ruby installations and gemsets with Ruby Version Manager (RVM).

#### Previous topic

salt.states.reg

#### Next topic

salt.states.saltmod

### Quick search

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

### Upcoming SaltStack Events

My conferences on Lanyrd