HOWTO install chef and vagrant on 10-9

O'hai! I did a clean install of Apple's OS X 10.9, Mavericks, so I had to reinstall Ruby, rubygems, chef, virtualbox and vagrant. Since this has been somewhat of a black art before, I wanted to document how it works; now. This is a quick and dirty reference, no explanations, but the results should get you up and running quickly.



ruby -e "$(curl -fsSL"
brew install rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

To make your shell use the rbenv set ruby each time, add the following to your `~/.profile`

eval "$(rbenv init -)"


brew install ruby-build
rbenv install —list
rbenv install 1.9.3-p448
rbenv global 1.9.3-p448


cd /tmp
tar -zxf rubygems-*
cd rubygems-*
sudo ruby setup.rb
echo "gem: --no-ri --no-rdoc" > ~/.gemrc</pre>

Chef (and supporting software)

curl | sed ’s/10.8/10.9’ | sudo bash
sudo gem install berkshelf
sudo gem install foodcritic
sudo gem install bundler



vagrant plugin install vagrant-butcher
vagrant plugin install vagrant-berkshelf


Now, let’s make sure all the pieces work together

vagrant init

Cut and paste the following two lines into the `Vagrantfile` somewhere above the last end line:

config.vm.box_url = ""

and "private_network", ip: "", :bridge => 'eth1'


vagrant up
vagrant status
knife bootstrap --ssh-user vagrant --ssh-password vagrant --sudo
vagrant ssh

You should now be in the new vagrant host, huzza!