diff --git a/salt/modules/rvm.py b/salt/modules/rvm.py index 161c89a84c..c58d46154f 100644 --- a/salt/modules/rvm.py +++ b/salt/modules/rvm.py @@ -111,7 +111,11 @@ def install_ruby(ruby, runas=None): # 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 - return _rvm('install', ruby, runas=runas) + if runas and runas != 'root': + _rvm('autolibs disable', ruby, runas=runas) + return _rvm('install --disable-binary', ruby, runas=runas) + else: + return _rvm('install', ruby, runas=runas) def reinstall_ruby(ruby, runas=None):