Created Installing Tracks 2.0 on Ubuntu 12.04 (rvm) (markdown)

jackbravo 2012-04-13 15:04:37 -07:00
parent 5a8d246c85
commit 84fefcf997

@ -0,0 +1,77 @@
# Installing Tracks 2.0 on Ubuntu 11.04
This is a guide to get a minimal version of tracks running on Ubuntu 11.04 (natty). This requires no apache, no lighttp, and no mongrel setup. Hence, the setup also will not scale, if you intend to support multiple users.
## Getting RoR
We first have to install the necessary packages for running RoR. Make sure you have ruby 1.8.7 installed with rvm:
rvm install ruby-1.8.7
sudo aptitude install build-essential libssl-dev libxml2-dev libxslt-dev libsqlite3-dev
## Getting the Source Code
We now get the latest source code for tracks:
`git clone https://github.com/TracksApp/tracks.git`
## Getting the bundle gems
Tracks needs a set of ruby gems. The Gemfile specifies them. There are problems with two specific ones: ZenTest and hoe. ZenTest can be easily fixed by requiring version 4.6.0:
`gem "ZenTest", "=4.6.0"`
For hoe, you can fix it by uncommenting it. The test suite will not work though.
If you need only either mysql or sqlite for Tracks, then you will have to edit the Gemfile and comment out either `gem "sqlite3"` or `gem "mysql"`.
Install the remaining gems by calling bundle:
bundle install
**Note:** If you're installing behind Apache, any gems specified in the Gemfile as coming from git will NOT be recognized by Passenger and you will get an exception that it has not been downloaded. The workaround for this Passenger bug is the following:
bundle pack
bundle install --path vendor/cache
More details can be found in [this forum post](http://www.getontracks.org/forums/viewthread/2220/).
## Setting up the Database
The minimal install uses sqlite3. This eliminates the need for installing and running mysql. You need to create a configuration file in `config/database.yml`. It can look like the one below, however, you might want to alter the paths to the sqlite databases.
development:
adapter: sqlite3
database: /tmp/tracks-devel.sq3
test: &TEST
adapter: sqlite3
database: ":memory:"
production:
adapter: sqlite3
database: /tmp/tracks-production.sq3
cucumber:
<<: *TEST
selenium:
<<: *TEST
Create your `config/site.yml` file from the template `config/site.yml.tmpl`.
## Initialize the Database
After creating the database, you need to initialize the database for the production system. You can also initialize it for the development system, however, for practical use, the production system is sufficient:
`bundle exec rake db:migrate RAILS_ENV=production`
## Starting the Server
The easiest way for running tracks is using ruby's server. This eliminates the need for configuring apache, mongrel, etc. Just run the server with:
`./script/server -e production`
## Done
Your system should now be up and running. Try to access the website: http://localhost:3000