Install MacPorts and run:
sudo port install erlang icu subversion
Add these two lines to your .bash_profile (or .profile if you’re running tcsh).
export ERLANG_BIN_DIR=/opt/local/bin/ export ERLANG_INCLUDE_DIR=/opt/local/lib/erlang/usr/include/
Run those two commands in your current shell or open a new one. Now, back to the install.
cd ~/projects svn co http://couchdb.googlecode.com/svn/trunk couchdb ./build.sh | tee couchdb_svn_build.log ./build.sh --install=$HOME/sys | tee couchdb_svn_install.log mv couchdb_svn_*.log ~/sys/log
Now, for convenience, we set up an easy way to start the CouchDb server. This assumes that
$HOME/sys/bin is in your
$PATH. Make a file called
#!/bin/bash/ cd $HOME/sys/couchdb && ./bin/startCouchDb.sh
Next, fix its permissions:
chmod +x $HOME/sys/bin/couchdb
Then, start the server:
(I follow this up with a
ln $HOME/sys/bin/couchdb $HOME/sys/bin/db but that might not be best for you.) Finally, follow the rest of Sam’s post to get a quick introduction to CouchDb.
Bonus Round: Ruby on top of CouchDb.
There are two Ruby gems for work on top of CouchDb, couchobject and CouchDb-Ruby but
couchobject seems the most promising. Why? Well, for one, its respository doesn’t include tests with syntax errors. And, two, it lets you write CouchDb views in Ruby, which is fantastic.
I haven’t gotten a chance to find its limitations, yet, but considering the deep magic involved and the 0.5.0 version number, I’m sure it has a few.
To get it, hit the site for the link to the tarball or grab the repository with:
git clone git://repo.or.cz/couchobject.git
I’m terribly excited. Enjoy!
Update: Now leaving Typo City.