Skip to content

Instantly share code, notes, and snippets.

Last active March 6, 2022 09:07
What would you like to do?
How to install Cabot on OS X for development

How to install Cabot on OS X

This manual describes a complete procedure how to install and run Cabot on OS X for development. It was tested on OS X 10.9.1 and Cabot version 2014-01-23.

Important notes

We’re using Homebrew to install the required dependencies on OS X. If you don’t have Homebrew yet (how is that possible? ;), see for an installation script. Note: MacPorts can be probably used too, but we didn’t test it.

Although you can use Python and Ruby that comes with OS X, it’s better to use Python installed via Homebrew and use rbenv to manage Rubies. Then you don’t need to use sudo and mess up your system. If you’re already using rvm instead of rbenv, then stay with it and skip the rbenv installation steps.

1. Prepare your environment

Make sure that Homebrew is up to date:

brew update

If you have Python via Homebrew, rbenv (or rvm) and npm already installed and configured, then simply skip these steps.

Install Python

Install Python 2.7 via Homebrew:

brew install python

Make sure that you have the right Python and pip binaries on your PATH:

which python
>>> /usr/local/bin/python
which pip
>>> /usr/local/bin/pip

Install rbenv

Install rbenv:

brew install rbenv ruby-build

Add rbenv init into your ~/.bash_profile and open a new terminal (to reload your profile):

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile

If you’re using the fish shell instead of bash, then add these lines to your ~/.config/fish/ and open a new terminal (to reload your configuration):

set -x PATH $HOME/.rbenv/bin $PATH
set -x PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1

Install Ruby and set it as default:

rbenv install 2.1.0
rbenv global 2.1.0

Make sure that you have the right Ruby and gem binaries on your PATH:

which ruby
>>> /Users/$USER/.rbenv/shims/ruby
which gem
>>> /Users/$USER/.rbenv/shims/gem

Install node / npm

Install node:

brew install node

Add npm/bin to your PATH:

echo 'PATH=/usr/local/share/npm/bin:$PATH' >> ~/.bash_profile

… or if your using the fish shell, then:

echo 'set -x PATH /usr/local/share/npm/bin $PATH' >> ~/.config/fish/

2. Install packages / dependencies

Install the required dependencies of Cabot:

brew install libxml2 libxslt redis

Install the foreman gem:

gem install foreman

Install coffee-script and less compilers:

npm install -g coffee-script less@1.3 --registry

Install virtualenv for Python:

pip install virtualenv

3. Setup Cabot

Clone the Cabot repository:

git clone
cd cabot

Configure the development profile:

cp conf/development.env.example conf/development.env
sed -i 's/:yourrediskey@//' conf/development.env

Create a new Python environment for Cabot and activate it:

virtualenv venv
source venv/bin/activate  # or

Install the dependencies:

pip install -r requirements.txt --exists-action=w

If it fails with complaint that it can’t find argparse, then install it manually and rerun the previous command:

pip install argparse --no-index -f

Populate a testing SQLite database; it should ask you to create a superuser account:

source bin/activate  # or

If fails due to an encoding problem, then do the following and rerun ./

rm dev.db
export LC_ALL=en_US.UTF.8

That’s all folks, now you can start your Cabol instance.

4. Start Cabot!

Don’t forget to source these two files to setup your environment (or their .fish equivalent):

source venv/bin/activate; source bin/activate

Then start an embedded server:

foreman start

…and open http://localhost:5001 in your browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment