UPDATE
I figured out how to fix the problem:
you need to delete the file
rm ~/Library/Caches/Homebrew/spidermonkey-1.8.5.tar.gz
and update your Homebrew by running
brew update
you may have a problem with git here (like mine) to allow it to reset all local changes to homebrew by running
git reset --hard
git clean -f -x -d
and run
brew update
and now it should be direct to install couchdb
brew install couchdb
(if you use LION):
brew install -v couchdb
to run its type
couchdb
source
share