Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ubuntu 11.04 minimal setup
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.
We first have to install the necessary packages for running RoR:
sudo aptitude install ruby build-essential libopenssl-ruby ruby1.8-dev sudo apt-get install rubygems1.8 sudo gem install bundler sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sudo apt-get install libxslt-dev libxml2-dev sudo apt-get install sqlite3 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
Install the remaining gems by calling bundle:
export PATH=/var/lib/gems/1.8/bin:$PATH 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.
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
config/site.yml file from the template
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:
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
Your system should now be up and running. Try to access the website: http://localhost:3000