fnichol/chef-rvm — Issue #75: Can I make the rvm ruby global for sudo as well?
Author: denishaskin
Created: 2012-03-06 22:02:48+00:00
State: open

I think this is just a lack of understanding, but:

I am installing rvm via chef-rvm very plain-vanilla with "recipe[rvm::system]".

The rvm ruby is not the default when running with sudo, though, and that worries me:

````
ubuntu@ip-10-110-153-111:/var/lib/obanyc/monitoring$ whoami
ubuntu
ubuntu@ip-10-110-153-111:/var/lib/obanyc/monitoring$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
ubuntu@ip-10-110-153-111:/var/lib/obanyc/monitoring$ sudo ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
ubuntu@ip-10-110-153-111:/var/lib/obanyc/monitoring$ rvmsudo ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

````

chef-client, for example, specifies /usr/bin/ruby1.8 explicitly.

Is there a way to make the rvm ruby *truly* be the system-wide one that gets used in all cases?