Install a ruby implementation.

    ruby
        The version of ruby to install

    runas
        The user under which to run rvm. If not specified, then rvm will be run
        as the user under which Salt is running.

    env
        Environment to set for the install command. Useful for exporting compilation
        flags such as RUBY_CONFIGURE_OPTS

    opts
        List of options to pass to the RVM installer (ie -C, --patch, etc)

    CLI Example:

    .. code-block:: bash

        salt '*' rvm.install_ruby 1.9.3-p385

def install_ruby(ruby, runas=None, opts=None, env=None):
    '''
    Install a ruby implementation.

    ruby
        The version of ruby to install

    runas
        The user under which to run rvm. If not specified, then rvm will be run
        as the user under which Salt is running.

    env
        Environment to set for the install command. Useful for exporting compilation
        flags such as RUBY_CONFIGURE_OPTS

    opts
        List of options to pass to the RVM installer (ie -C, --patch, etc)

    CLI Example:

    .. code-block:: bash

        salt '*' rvm.install_ruby 1.9.3-p385
    '''
    # MRI/RBX/REE dependencies for Ubuntu 10.04:
    #   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
    if opts is None:
        opts = []

    if runas and runas != 'root':
        _rvm(['autolibs', 'disable', ruby] + opts, runas=runas)
        opts.append('--disable-binary')
    return _rvm(['install', ruby] + opts, runas=runas, env=env)