Skip to content

Using Chef on a Debian box

rosenfeld edited this page Jan 8, 2013 · 1 revision

This is not documented on official documentation here:

http://docs.vagrantup.com/v1/docs/provisioners/chef_solo.html

In Debian gem binaries are installed in /var/lib/gems/1.8/bin (for 1.8 version) by default when using Debian Ruby packages. If you try to use Vagrant on a stardard Debian box you'll notice Chef won't work because that gem binaries path is not on $PATH. You need to inform the Chef provisioner what is the binary path by doing something like:

config.vm.provision :chef_solo do |chef|
  chef.binary_path = '/var/lib/gems/1.8/bin'
end

If you're also using the rvm recipe, you may want to also add this:

chef.json = {
  :rvm => {
    #...
    :vagrant => {
      :system_chef_solo => chef.binary_path
    },
  }
}

Clone this wiki locally