Whilst I am on the subject of CouchApps, there is a typo in code listing 10-4 on page 171 of Beginning CouchDB which causes the javascript to not work. Specifically, if you get a message along the following lines in your browser’s error console:
$.CouchApp is not a function
You can fix this by making an edit at the bottom of listing 10-4, in the last <script> line it should read:
<script src="vendor/couchapp/jquery.couch.app.js"></script>
instead of:
<script src="vendor/couchapp/jquery.couchapp.js"></script>
Notice the missing period between couch and app? Enough to stump a beginner for hours!
Addendum #1 – A missing $ in listing 10-6 for main.js on page 176 in the parseInt line:
var task_count = parseInt('#task_count span').html(), 10);
should be:
var task_count = parseInt($('#task_count span').html(), 10);



Non-Running CouchDB Testsuite
Just updated my CouchDB install guide as I discovered a problem with the install. Mostly my own fault for not checking the testsuite immediately after I installed but when I came to do that today, after discovering that none of my views worked, and even a temporary view was causing the CPU load on the VM to shoot up, I found that the testsuite wouldn’t run at all and would just lock up the page with high VM CPU load. I found the solution via serverfault under the title “CouchDB 0.11 on Ubuntu 10.04”
So, the solution is basically to shutdown CouchDB, put you version of xulrunner-devel on your LD_LIBRARY_PATH as follows:
Now restart CouchDB and run that darn test suite!