» JRuby Project Wiki Home Page
JRuby on Rails
You can use JRuby with Ruby on Rails. JRuby gives Rails the power and functionality of the Java Platform, providing it with:- Excellent garbage collection for endless uptimes
- Hotspot profiled dynamic optimizations for great performance
- Access to the Java ecosphere for additional technology options
- Deployment to Java application servers for ubiquity
Getting Started
Get started with these tutorials:
- 120-second guide to JRuby on Rails
- Deploying a Rails application in Tomcat with JRuby: A concise tutorial
- JRuby on Rails with Spring - zero to
.warfile with Spring and Maven. - "Porting" the Depot Application To Jruby, Parts 1 and 2: These tutorials show you how to make the Depot application from "Agile Web Development with Rails, Third Edition" work with Jruby.
Deployment
War File Deployment
If you don't use a traditional Ruby application server like Mongrel, you can use a Java application server. To deploy to a Java app server, you can use the tool Warbler to bundle your Rails application in a Java Web Application Archive (.war file). (Warbler is a minimal, flexible, Ruby-like way to create a .war file.) Once you have a .war file, you can deploy to any Java app server using its war deployment mechanism.
Some links to information on various Java appllication servers:
Glassfish v3 Deployment
The Glassfish gem by Vivek Pandey enables you to easily deploy a JRuby on Rails application to the Glassfish v3 modularized Java application server. The Glassfish gem wraps the essential technologies in 3 MB and allows you to run your application using a traditional approach, as if you were running Mongrel, Rack, and so on. A brief tutorial can be found here:
JRuby on Rails with Glassfish Gem.
See also:
Traditional Rails Deployment
- Glassfish Gem on Rubyforge
- New features in GlassFish 0.9.3 gem
- Mongrel web site
- Mongrel Web Server entry on Wikipedia
- Swiftiply with Mongrel
- WEBrick website
- WEBrick entry on Wikipedia
- Gnome's Guide to WEBrick
- Passenger
- TorqueBox (based on JBoss)
- Trinidad (based on Tomcat)






