Torquebox is a Ruby application platform incorporating supports for technologies such as Rails and Sinatra. It has built-in support for services and functionalities like messaging, scheduling, caching, daemons, clustering, load-balancing and high-availability. Basically the following diagramme describes it all.
This guide helps installing and setting up JRuby with Torquebox on Mac OS X Snow Leopard (OS X 10.6.8). This may vary on OS X Lion/Mountain Lion, but basically, it is similar. Creating an app and starting up the server is generally the same in all operating systems.
Installing and Setting Up
Get and install RVM
Find the latest version of RVM
Setting up Torquebox Gemset
Install Torquebox Gem
Install Torquebox-Server via RVM and jruby gem install
Install Rails3 for JRuby
Create Your Rails Project
Use the torquebox template for creating a new rails app, it puts it in a subfolder just like normal rails new myapp
Change to Rails App Directory
Do a Quick Test, this should load WEBrick
Verify ENV vars
Run this and verify that your ENV vars are set properly, if not torquebox deploy/undeploy won’t work
Make sure your environment variables look something like this, your username instead of “username”
Set your JRUBY Options: run with 1.9.x, turn on jit logging (turn off to make quieter in term)
If you added Gems Bundle Install to make sure we’re all set up, if not torquebox rails already handled this
Setup to Run on Torquebox
Test Running on Torquebox
Browse localhost:8080 and voila! there it is!