Installing CouchDB on a VirtualBox instance with Chef and Vagrant

This assumes you’ve already installed Virtualbox and configured a base VM. mkdir cookbooks cd cookbooks git clone https://github.com/opscode-cookbooks/apt git clone https://github.com/opscode-cookbooks/erlang.git git clone https://github.com/opscode-cookbooks/couchdb.git cd .. mkdir vm cd vm vagrant init vi Vagrantfile Insert the following lines before the last line “end”, like so: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = “../cookbooks” chef.add_recipe(“apt”) chef.add_recipe(“couchdb”) end […]

Fixing error “apt-get… return 100 expected 0” (Chef/Vagrant)

When running Chef for the first time on a VM, you may see an error like the following: apt-get -q -y install couchdb=0.10.0-1ubuntu2 returned 100, expected 0 The problem is that your Vagrantfile script does not require Chef to do an “apt-get update” before running it’s scripts. This normally triggers updating the apt database, and […]

Fixing Vagrant error “Chef::Exceptions::CookbookNotFound”

[Fri, 17 Aug 2012 02:52:02 +0200] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook couchdb not found. If you’re loading couchdb from another cookbook, make sure you configure the dependency in your metadata This is an easy error to create if you only downloaded one cookbook. It’s tempting to write the path as “./couchdb” when in fact, the path is […]

Vagrant: “The following SSH command responded with a non-zero exit status. “

Vagrant up often returns the following error running Chef scripts: The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-csc-1 /tmp/vagrant-chef-1/chef-solo-1/cookbooks You can troubleshoot this by logging into the running server, then running the command (the password […]

Fixing “The box ‘base’ could not be found.” (Vagrant)

This is an indication that the the base virtual image is not configured, usually from forgetting to finish the installation. This image is copied, and modified to produce the desired virtualized environment. It’s easy to fix, by running the following: vagrant box add base http://files.vagrantup.com/lucid32.box It is also possible that you installed the box under […]

First Philadelphia Node.JS Meetup

I went to the first Philadelphia Node.JS meetup last night hosted by Zivtech. It was a mix of local developers at various stages in their careers. There were several informative impromptu presentations, including a demonstration of file transfer using web sockets and Node.JS and sending Apple IOS push notifications from Node.JS. Useful libraries: Socket.io – […]

Scraping a List of Adsense Sites Within a Niche

One of the challenges in web crawling and scraping is determining which URLs to scrape. It’s easy for a site to have many urls that aren’t visited by humans, like a stock photo site that uses an API to supplement its data. Sites with sessionid parameters or dynamic content may make many duplicate or similar […]


How to find Pitches in Music

Have you ever wanted to find what chords were in a song? A good first step is to read the notes played during a short time interval. If several notes are played simultaneously, in order to figure out the notes, we need to separate the waveform into the individual frequencies. Fortunately there is a well-established […]


Using Prolog to Generate Test Data

I’ve built several reporting systems where work was divided evenly between a charting UI and database scripts – an ETL job, report sql, and database schema. It’s nice to divide work between UI and database developers to take advantage of specialization, but not having data is always an issue for the first week or two […]