Friday, December 28, 2012

build-couchdb on Ubuntu 12.04 LTS (Precise)

I'm not sure if anyone else has had this issue with running rake for the awesome build-couchdb script on Ubuntu 12.04, but I kept getting an error:

odd number of arguments to Hash

I don't really know Ruby, but I think this might just be because the default ruby install in Ubuntu is ruby 1.8, and the Hash initialization that build-couchdb uses in the rake task is a ruby 1.9 thing only.  However, after I hacked the distros.rb file to use a saner (1.8-like, I guess) initialization, it seems to work just fine.  So, if you do this, I guess you don't have to worry about installing a later ruby 1.9 build or anything.  You can keep using the default Ubuntu one.  Here's the gist:
https://gist.github.com/4392033

Just copy that over to build-couchdb/tasks/lib/distros.rb, and all the rake commands for build-couchdb should work.