How to Run Ruby Apps on Apprenda

By Atos Apprenda Support


The Apprenda Platform as a Service (PaaS) has focused on deep support for Java and .NET for years, but it has actually been capable of running Ruby apps since 2013. In fact, Apprenda can host and run Ruby and Rails applications on its platform without any code changes to the application.

You can accomplish all of this through a combination of JRuby and Warbler. JRuby is essentially a Ruby interpreter app that runs inside a Java VM (JVM). Standard Ruby code works the same inside the JVM just like it was running on an ordinary Linux node. JRuby allows developers to run Ruby on Apprenda with no changes required and offers a variety of benefits over other Ruby execution engines, including portability, extensibility, and deployment.

Warbler is an app that constructs WAR files of your Ruby applications and makes running Ruby on Apprenda effortless. Basically, Warbler is a Ruby gem that takes your JRuby application in its directory, assembles all your gems, and lays them into a WAR file. That WAR file can then be placed into a Tomcat, JBoss, or any of the other Java servers supported by Apprenda. Then, like any other sort of application, you can upload that same WAR file to Apprenda, and have the cloud take care of the rest.

As far as setting up a Ruby application to run, if you have your own app running locally with Ruby or JRuby already, congratulations. Add in a configuration file for Warbler to work with it and have it produce a WAR file. If you’re trying to use Warbler with your favorite app that’s not your own, you’re going to need to go gem diving before you can Warble up everything for your Java servlet. You can do this easily enough, as the bundler gem can help you get all the gems you need for any application. Once dependencies are installed, you simply add a Warbler configuration file and then Warble to make the WAR file easy to use.

For JRuby experts out there, none of this will be new. But if you’re not familiar with Apprenda, then one should note that for Apprenda, once you’ve created the WAR, using it is as easy as uploading a WAR and hitting play. The app’s scaling, accessibility, and memory are all taken care of by the platform, rather than requiring you or a technician to set it up on your own server.


Atos Apprenda Support