One of the advantages of running Ruby on the JVM is that we can deploy multiple applications to the same webserver. Using one JRuby webserver means that there is only one process to manage, monitor, start and stop. Your sysadmins will thank you.
But having mutliple application on one virtual machine also means we can configure them to share resources, thus reducing the overhead required for a production server. In this post, we'll walk through an example of deploying two applications to one Trinidad server.
Trinidad is a light-weight JRuby web server that runs Rails and Rack applications in an embedded Apache Tomcat container. Let's install it by running this command:
$ gem install trinidad -v 1.3.4