saltstack/salt — pull request #7874 by skrobul (2013-10-16 11:02:35+00:00)
Title: Stop calling sudo for RVM installs when running as non-root user.

I was having problems with deploying non-root installation of RVM and Ruby using salt's rvm module.
It turns out that by default, autolibs will try to elevate privileges if there are some missing packages for requested Ruby version. It does make sense for interactive installations, but fails miserably in scripted environments.
If all dependencies are properly installed it is possible to compile and install new Ruby on a user level without need to elevate privileges. Only thing required to stop RVM from trying to sudo is to disable autolibs and add '--disable-binary'.

I was able to successfully install non-root, user level RVM with compiled ruby on a blank Debian/Ubuntu box.