I'm on Ubuntu Trusty 64. Running with the packaged versions of Vagrant and Ruby is a fool's errand. I used the Vagrant 1.5.4 package. Vagrant has an embedded Ruby which causes all kinds of grief cross-linking with stuff in the Ubuntu versions of the packages. I ended up removing them wholesale, but you may be ok if you be sure and always use the binaries from: /opt/vagrant/embedded/bin/
It took me almost a week to figure this out thanks to a lot of very unhelpful errors and red herrings. I figured I'd do a write-up and save you some suffering.
Update your Vagrantfile:# Add the base vagrant box vagrant box add ubuntu/trusty64 http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box # Setup the vagrant instance cd my-project vagrant init ubuntu/trusty64 # Setup berkshelf and fix some path grief env SSL_CERT_FILE=/opt/vagrant/embedded/cacert.pem /opt/vagrant/embedded/bin/berks rm -rf ~/.berkshelf/default/cookbooks/ ln -s ~/.berkshelf/cookbooks/ ~/.berkshelf/default/cookbooks # Get dependencies sudo /opt/vagrant/embedded/bin/gem install bundler /opt/vagrant/embedded/bin/bundle vagrant plugin install vagrant-chef-zero vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.0'
Then:config.berkshelf.enabled = true config.chef_zero.enabled = true config.chef_zero.environments = "./environments/" config.chef_zero.data_bags = "./data_bags/" config.chef_zero.roles = "./roles/" config.chef_zero.cookbooks = "./cookbooks/" config.vm.provision :chef_client do |chef| chef.run_list = [ "role[base]" # Yours may be different ] end
vagrant up