-
Notifications
You must be signed in to change notification settings - Fork 0
Ubuntu 11.04 minimal setup
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
We now get the latest source code for tracks:
git clone https://github.com/TracksApp/tracks.git
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. Install the remaining gems by calling bundle:
export PATH=/var/lib/gems/1.8/bin:$PATH
bundle install
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
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
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