Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (57 sloc) 2.97 KB


It's your fucking Rails application. You know how to run it. If for some reason you don't, read instructions below. Please note, instructions assumes that you can read them, copy-paste commands and read their output. If you can't do that, click

Install RVM

Go to and follow instructions. Install default requirements as rvm tells you, but do not install ruby.

Install Ruby

rvm install 1.9.3 --default

Create Gemset

rvm 1.9.3@worm-reports --create

Checkout Project

git clone
cd worm-reports

If you are Java developer, visit first.

Configure Database

Put needed database driver to Gemfile (defaults to PostgreSQL) and adjust config/database.yml to point to your database. By default rails will start in development mode, so edit development section. Also, install dev package for your database. E.g. for postgresql on Ubuntu you need to run following command.

apt-get install libpq-dev

Install Gems


Install ExecJS Runtime

Go to and read documentation. Best choice here is Node.js. Follow instructions at following link If you are using Ubuntu or other broken distro, turn it into Slackware as described at Don't worry, it's Debian Way (tm).

Sample Data

If you need sample table and data, run following commands.

rake db:migrate
rake db:seed

Reports Definitions

By default it loads all XMLs from config/reports. Adjust config/initializers/reports.rb if you need other path.

Start Server

rails s


Now point browser to http://localhost:3000/reports and have fun.



Pagination supported by lib, but not enabled for client. If you need, edit show method app/controllers/reports_controller.rb to something like:

(count, @fields, @sql, @data) = report.execute(parameters, page, 50)
num_pages = count / 50 + (count % 50 == 0 ? 0 : 1)

Also, don't forget to add navigation HTML to app/views/reports/show.html.erb.


Note, all date operations are executed in server's TZ. Also, please note that datetime format support is limited to yyyy (4 digit year), yy (2 digit year), mm (2 digit month), dd (2 digit day of month), hh (2 digit hour in 24h format), ii (2 digit minutes) and ss (2 digit seconds). Hours/minutes/seconds must be after year/month/day. If you want more - feel free to hack lib/reports/parameters/date.rb, lib/reports/parameters/datetime.rb and lib/reports/formatters/datetime.rb.


If field format is specified, it's assumed to be datetime format. If you'll try to add format to non date or datetime field, result will be... surprising.

Case Sensitivity

One and only requirement is valid XML. Inside of it you can use (and mix) any case(s) you want.

Jump to Line
Something went wrong with that request. Please try again.