Installation instructions for Earth
Download Earth
Download the latest version of Earth
Untar the distribution
tar zxvf earth-0.1.tar.gz
Dependencies
Earth is built using the language Ruby, the web development framework Ruby on Rails and the database Postgres. If you don't have these installed follow these instructions.
Create Earth database
(Execute the following as the user with PostgreSQL administration privileges, usually postgres.)
createuser --no-superuser --no-createdb --no-createrole earth createdb --owner=earth earth_production createdb --owner=earth earth_test createdb --owner=earth earth_development
If your database is not running on the same host as the web application or one of the daemons, or if you chose to use a different database user or database name, edit config/database.yml accordingly.
You might have to edit pg_hba.conf in the PostgreSQL data directory for a successful connect if it doesn't trust local users by default, or if you're not running the web application or a daemon on the same machine. Editing this file can also be advisable for security reasons depending on your network configuration.
FIXME: Above instructions will create a database user with no password. Depending on what pg_hba.conf looks like, the earth database user might need to have the password "earth". Alternatively, database.yml should use an empty password for connections instead of "earth". Security-wise, this wouldn't make a big difference.
FIXME: Maybe these installation instructions should be split up into two separate pages - one for "quickly getting it to run on a single machine" and one for "setting it up in a distributed environment" - so that above instructions can be simplified. Perhaps three pages - "quick start on one machine", "proper networked setup", "development setup"?
Migrate the database
cd earth rake db:migrate
Run the unit tests (optional)
For a good deal of confidence that everything is set up correctly and working, run the unit tests. It's as simple as:
cd earth rake
Start Earth daemon
cd earth/daemon ./earth_daemon directory_to_watch
Start web application
The simplest way to get started is to use "Webrick" the default web server that comes with Rails. By default the Earth daemon will put everything into the "production" database. So, start up the web application in "production" mode.
cd earth ./script/server RAILS_ENV="production"
Use the Earth web application
Point your browser at http://localhost:3000 and you're using Earth!
