Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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: http://docs.opscode.com/install_workstation.html 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

1 Answer 1

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

 
discard

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.