I'm trying to figure out one thing and would like someone's else view on this. I installed chef on my Ubuntu server (11.10) via the awesome omnibus install. It worked perfectly fine. I was able to run chef-client and it ran without any problems.
Then I installed RVM and two rubies - and that's when my problems started. Straight after I installed RVM system wide ie by running:
curl -L https://get.rvm.io | sudo bash -s stable
And installed 2 rubies (setting one of the rubies as default ruby on the system) I couldn't run chef-client any more - I was getting "command not found" when run as normal regular user - I was thinking RVM messes some PATHS so that was the reason. I thought I'd run it as root ie:
sudo su -
chef-client
same result. Then I tried rvmsudo as it's being suggested by some people but that didn't help either. Then I gave it a last shot - I ran it as
sudo chef-client
And that's worked fine! I'm really puzzled as why is the above working and why is running chef -client as root (ie sudo su -; chef-client) NOT working. Am I missing something ? I'd really appreciate all the hints or explanations as I'm a bit lost. I'd like to run chef-client as a daemon as root and I can't do that with the sudo command above - I know I could set a user with nopasswd and it would probably work but I'd really like to understand what's going on here ;)