Developing Alt Law on Mac OS X

There is a neat project that I have wanted to get involved with for a while called AltLaw. AltLaw is a free open source project developed by the Columbia Law and Technology program. Resources for the project are located at the Law Commons Trac Page.

I am trying to get the AltLaw “stack” working on my Mac OS X machine. So here we go:

1) Download the file and unzip it. I will refer to the location of this unzipped file as {alt-law-config-directory} throughout the rest of this tutorial.

2) Next, we have to get the Rails front end working.

(Prerequisites: sqlite, git)

% git clone git:// altlaw-websearch/.git
% gem install -v=2.1.0 rails
% gem install htmlentities
% gem install BlueCloth
% gem install solr-ruby
% gem install ruby-debug
% gem install chronic
% gem install json
% cd altlaw-websearch
% mkdir log
% chmod -R 644 log/
% cp {alt-law-config-directory}/altlaw-config/rails-config/* config/database.yml
% rake db:migrate

In the file config/environment.rb, change the line:

SOLR ="http://localhost:8196/v3/solr")


SOLR ="http://localhost:8983/solr/")


ExceptionNotifier.exception_recipients = ['']


ExceptionNotifier.exception_recipients = ['']

% ./script/server

This starts the Rails front end at http://localhost:3000

* To run the Rails front end in production mode do the following:

(Additional prerequisites: mysql)

update config/database.yml with the proper configuration for you database

% rake db:migrate RAILS_ENV=production
% rake sass:update
% RAILS_ENV=production rake asset:packager:build_all
% ./script/server -e production

3) Finally, we need Solr:

The following tutorial seemed to work perfectly on my Mac OS X:

% wget
% tar xvfz apache-solr-1.2.0.tgz
% cd apache-solr-1.2.0
% cp -r example/ alt-law/
% cd alt-law/
% cp {alt-law-config-directory}/altlaw-config/solr-config/* solr/conf/
% java -jar start.jar

This starts solr at http://localhost:8983/solr/.

This set of instructions worked for me. I would love feedback on what it would take to get this to work on non Mac OS X system.


2 responses to “Developing Alt Law on Mac OS X”

  1. Einar Avatar

    Your second link (to solr) isn’t right – points to the previous link

  2. Anil Avatar

    @Elinar: Thanks. Good catch.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.