Make sure you are using Ruby 2.1.1 ...
rvm: rvm use 2.1.1
rbenv: rbenv rehash
git clone https://github.com/empirical-org/CoFactor.git
cd cofactor
bundle
rake db:migrate
rails s
brew install postgres
or comment out the gem 'pg'
line in the Gemfile. CoFactor uses sqlite locally.