Installing locally

antot edited this page Feb 7, 2013 · 22 revisions

If you want to run your own server with Teambox, some knowledge of Ruby on Rails and UNIX is helpful.

This document explains how to get Teambox running in your local machine. The guide is intended for Linux, Mac and Unix-like systems.

Need help? Email us to do it for you as a professional service.

Otherwise if you have problems that our open source community might help with, please refer to the teambox community project.

Pre-requisites

You’ll need a UNIX-based machine, like Linux or Mac. We can’t offer support for Windows.

Make sure you have the following installed:

  • Git, so you can download the source. Check with git --version
  • Ruby 1.8.7. You may have it already, check ruby -v to make sure.
  • RubyGems, extract it and run sudo ruby setup.rb. Check with gem -v
  • Bundler. Install with gem install bundler -v '~> 1.0.0.rc', check with bundle -v
  • MySQL, the database we are using. Check with mysql --version. (You can also try any other ActiveRecord-supported database, like PostgreSQL.)
  • ImageMagick so you can resize images. On Mac OS X, easiest way is with Homebrew: brew install imagemagick. Check with convert -version

Getting the source and dependencies

First, download the code:

git clone git://github.com/teambox/teambox.git
cd teambox

Now choose the branch you will be running on.

  • master is the stable branch, best for production environments.
  • dev is the development branch, always on the cutting edge with features.

In this case, we will use master:

git checkout master

Bootstrap necessary ruby libraries with Bundler:

bundle install

Copy example configuration files

Copy the example configuration files to their proper names. If you move them instead of copy them, you’ll run into problems when you update Teambox in the future.

cp config/database.example.yml config/database.yml

Configure Teambox:

Edit “config/teambox.yml” to set your domain name and email information. see Configure-teambox.yml for more information.

A good service for outgoing email is Sendgrid. You can also use GMail.

host: smtp.sendgrid.net
username: your@username.com
password: your_password
auth: plain
port: 25
enable_starttls_auto: false

Configure the database

Edit “config/database.yml” and set your database user and password under environments you’re going to use.

In the following steps, substitute “development” with “production” if you’re setting up a production environment on a remote server.

Bootstrap the database:

bundle exec rake db:create db:schema:load RAILS_ENV=development

Test your app if working

Inside the directory where you installed Teambox, run the server:

rails server -e development

This fails on Ubuntu 12.04. The following command works though:

./script/rails server -e development

Now browse to http://localhost:3000 (substitute “localhost” for your domain name if you’re on a remote server), you should see a server with your Teambox copy.

You now have a working Teambox install. However, this is not suitable for production because the server we are using is meant for development. Page loads will be very slow in development mode, since they reload every time.

If you intend to use Teambox in a real production server, check other guides on how to install production servers.

Bonus: Example data

If you want to have an example database with users, conversations and tasks to play with, run this after your installation is complete:

bundle exec rake db:seed

It will help you for development.