0

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.

1 Answer 1

0

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" 
2
  • 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? Commented Apr 19, 2013 at 3:27
  • No idea. Sorry! I'm not a ruby guy. Commented Apr 19, 2013 at 3:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.