Last Updated: February 25, 2016
·
1.804K
· ammutable

Update your Vagrant Chef-solo recipes

Some one told you about rove.io and in less than 1 minute you had your rails configured:

  • download the zip
  • cd path into it
  • and curl -L http://rove.io/install | bash as you where told

You just did it, your machine is ready to RoR!

Then you start working, vagrant ssh and at some point you realise you need to install nodejs... Ok this should be easy, take a look into the Cheffile and add:

cookbook "nodejs", {:github=>"mdxp/nodejs-cookbook"}

Then in the vagrant file:

chef.add_recipe 'nodejs'

Lets provide the machine with the new settings we defined:

vagrant provision

And you (someone with no idea how Chef works =P ) just hit a wall:

Chef::Exceptions::CookbookNotFound: Cookbook nodejs not found. If you're loading nodejs from another cookbook, make sure you configure the dependency in your metadata

Something is missing... Remember the that magic curl at rovio.io? The answer is there, let's see:

http://rove.io/install:

#!/usr/bin/env bash

gem install chef
gem install librarian-chef
librarian-chef install
vagrant up

So to grab required cookbooks you need to run:

librarian-chef install

Simple things that may be not so obvious if you skip the docs!

Stay sharp ;)