For an isolated install within a user's $HOME, not for root. Recomended by wayneeseguin in https://rvm.io/rvm/install
Not really tested so far. For me it works in ubuntu 12.04LTS. Used in puppet 2.7 but it should also work in recent versions
If you are planning of using this for a ruby on rails with capistrano probably will be a better idea to use the rvm/capistrano plugin along capistrano
It won't install any ruby, just rvm. NOTE: User jhondoe will be created if doesn't exist
rvm::rvmuser{"jhondoe":} # Install stable version of rvm for the user jhondoe, creates user if inexistent
Installing and compilling any ruby version can take a while (>400seconds?) The ruby version will be the default for this user
rvm::rvmuser{"jhondoe":
installdefaultruby => "2.0.0-head", # Optional Indicates the version that will be
#installed. Find available ruby versions with $rvm list known
homeuser => "/home/jhondoe", #defaults to /home/jhondoe(If jhondoe is the provided user)
}
rvm::installruby{"install-ruby-to-jhondoe":
user => 'jhondoe', #required
rubyversion => "2.0.0-head", #required
makedefault => true, #defaults to false
homeuser = "/home/jhondoe", # Optional, defaults to /home/$user
extraflags => "--verify-downloads 1", #Optional, defaults to undef
}
rvm::creategemset{"gemsetname":
user => "jhondoe", # user param is required
rubyversion => "2.0.0", # Ruby version is required
homeuser = "/home/jhondoe", # Optional, defaults to /home/$user
}
Remember that a gemset is usually used to switch to a ruby version and a set of gems. In a directory, if you write a file called .ruby-gemset with the content "gemsetname" and a file called .ruby-version with the content "ruby-1.9.3-p374" rvm will automatically switch to that ruby version with the gemset called 'gemsetname' when you enter in that dir. More info about this in rvm website