Running AltLaw

This page is for developers.

This describes how to get the AltLaw source code up and running on your own machine.

Requirements

AltLaw requires the following packages:

  • Git for downloading source code
  • Java 1.5 or higher
  • Solr 1.2
  • Ruby 1.8
  • SQLite 3
  • Rubygems
    • BlueCloth
    • chronic
    • feedtools
    • haml
    • hpricot
    • json
    • mongrel
    • rails 2.0.2
    • RedCloth
    • rspec
    • solr-ruby
    • sqlite3-ruby

Installation Instructions

These instructions were written for Ubuntu Linux.

1. Install all dependencies:

sudo apt-get install git-core sun-java6-jdk ruby-full build-essential ruby1.8-dev rubygems sqlite3 libsqlite3-dev rake
sudo gem install -y -v=2.0.2 rails
sudo gem install -y BlueCloth chronic feedtools haml hpricot json mongrel RedCloth rspec solr-ruby sqlite3-ruby htmlentities

2. Download apache-solr-1.2.0.tgz from Apache: http://www.apache.org/dyn/closer.cgi/lucene/solr/

3. Install Solr and the AltLaw sample data:

tar -xzf apache-solr-1.2.0.tgz
cd apache-solr-1.2.0
cd example/solr
rm -rf conf data
wget ftp://lawcommons.org/files/solr_sample.tar.gz
tar -xzf solr_sample.tar.gz
cd ../../..

4. Install the Rails application:

git clone git://github.com/lawcommons/altlaw-websearch.git
cd altlaw-websearch
rake config:example
rake db:migrate
cd ..

5. Change Rails configuration:

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

SOLR = Solr::Connection.new("http://localhost:8196/v3/solr")

to:

SOLR = Solr::Connection.new("http://localhost:8983/solr/")

Running Instructions

1. Start Solr:

cd apache-solr-1.2.0/example
java -jar start.jar

You should now be able to get the Solr admin interface at http://localhost:8983/solr/

2. Start the Rails application

cd altlaw-websearch
script/server

You should now be able to get the AltLaw home page at http://localhost:3000/