Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant / Chef-solo not working after running recipe rvm::vagrant

Tags:

rvm

chef-infra

After adding recipe rvm::vagrant and running vagrant provision I got:

/usr/local/bin/chef-solo: line 23: /opt/vagrant_ruby/bin/chef-solo: No such file 
or directory
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

This issue should have been fixed: https://github.com/fnichol/chef-rvm/issues/121

Even though I add the line:

'rvm' => {
    'vagrant' => {
      'system_chef_solo' => '/opt/vagrant_ruby/bin/chef-solo'
    }
  }

I am still getting the error. How can I recover from it?

like image 561
mbdev Avatar asked Mar 15 '13 05:03

mbdev


1 Answers

You have to make sure that '/opt/vagrant_ruby/bin/chef-solo' is actual path of chef-solo. In my case it was /usr/bin/chef-solo. And this is part of my Vagrantfile that fixed it:

config.vm.provision :chef_solo do |chef|
  chef.json.merge! rvm: {vagrant: {system_chef_solo: '/usr/bin/chef-solo'}}
end
like image 84
Dmitriy Budnik Avatar answered Oct 19 '22 13:10

Dmitriy Budnik