Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have chef installed on my local machine: Mac OS X 10.8.3

I also have chef installed on a remote server: Ubuntu 12.10 x64 Server

On the local machine, when I try to execute a command using ssh followed by "chef-solo...":

ssh root@remoteserver "chef-solo -c /var/chef/solo.rb"

I keep getting:

bash: chef-solo: command not found

I have installed chef using the instructions here: I have also checked whether chef is correctly installed (both on the remote server and the local machine)

$ chef-solo -v
Chef: 11.4.0

Does the binary folder in /opt/chef/bin need to be added to the PATH variable? I have a .bash_profile in ~ but the only line in that is:

[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" # Load RVM into a shell session *as a function*

I have tried to: export PATH="$PATH:/opt/chef/bin"

But this doesn't help.

share|improve this question
up vote 0 down vote accepted

Run $ which chef-solo, which will return the full path to that binary. Then use that full path in your ssh command:

$ ssh root@remoteserver "/path/to/chef-solo -c /var/chef/solo.rb"
share|improve this answer
Thank you very much. This has resolved the original error. However, another has been introduced: ruby_noexec_wrapper: No such file or directory Any ideas about this? – CommonCents Apr 19 '13 at 3:27
No idea. Sorry! I'm not a ruby guy. – EEAA Apr 19 '13 at 3:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.