Skip to content
mackrauss edited this page May 8, 2012 · 20 revisions

Install

Prerequisites

Rollcall is a Rails 3.x application. You don't need to know anything about Ruby or Rails to install and run it, but you will need a basic Ruby environment. Check if ruby and gem commands already work on your command line. If so, you're probably good to go. Otherwise follow instructions on the Ruby Language site.

Install Ruby on Debian or Ubuntu before 12.04

The Ruby on Debian and Ubuntu is often rather old and Gems don't work as expected. We recommend to install Ruby via RVM Ruby Version Manager Important Follow the Multi-User installation

After you installed RVM add the user you work with to group rvm and use ruby 1.8.7 by

rvm use 1.8.7

Installing Ruby 1.9.3 on Ubuntu 12.04

sudo apt-get install ruby1.9.3

Installing the MySql database on Ubuntu:

sudo apt-get install mysql-server

Gemfile for Ruby 1.9.x vs. Ruby 1.8.x

Ruby 1.8.x works with ruby-debug, while Ruby 1.9.x requires ruby-debug19 Please edit the Gemfile in the rollcall directory

cd dir-to/rollcall
vi Gemfile ==> uncomment or comment the fitting ruby-debug line (#)

Satisfying Gem dependencies

Make gem mysql 2 work

mysql2 only installed on Ubuntu 12.04 with ruby1.9.3 after I installed this package:

sudo apt-get install libmysqlclient-dev

####Make gem Nokogiri work sudo apt-get install libxslt-dev libxml2-dev

Quick Install

The following set of commands should get you up and running (without XMPP integration):

gem install bundler
cd <where you want rollcall installed>
git clone git://github.com/educoder/rollcall.git
cd rollcall
bundle install --without development

nano config/database.yml
# Change the production settings near the bottom of the file to choose your database.
# Afterwards create the database if necessary (e.g. `mysqladmin -u root create rollcall`).

nano config/environments/production.rb
# Since we are serving stand-alone not with Apache
# Change the following line: config.serve_static_assets = false 
# to: config.serve_static_assets = true

#This passes an environment variable to the rake invocation.
RAILS_ENV=production rake db:migrate

rails -v
# make sure you're running Rails 3.0.7 or higher!

rails s -e production

Rollcall should now be running at [http://localhost:3000].

The commonly used RESTful URLS are:

Most URLs also responds to .xml and .json extensions. For example:

XMPP Server Integration

Rollcall can be used to manage accounts in one of the following XMPP servers:

To enable integration for your XMPP server, uncomment the correct module in the Gemspec file and configure things under config/environments/production.rb (or development.rb if you're running in development mode). Examples for each supported XMPP server are included at the bottom of the stock production.rb config file.

REST API

Client Examples

Writing Plugins

See this Gist for now: https://gist.github.com/1251821

Database Schema