X
Tech

JRuby on Rails (JRoR) demonstrated at JavaOne

Thomas Enebo and Charles Nutter surprised attendees of their JRuby talk at JavaOne today by showing off an early prototype of JRuby on Rails. Being careful to call it a "development preview", they promised that by the end of the summer they would have a fully supported version working.
Written by Ed Burnette, Contributor

Thomas E. Enebo (Aandtech) and Charles Nutter surprised attendees of their JRuby talk by showing off an early prototype of JRuby on Rails. Being careful to call it a "development preview", they promised that by the end of the summer they would have a fully supported version working. Downloads will be available before then in order to get early feedback.

Live demo of JRuby on Rails

The possibilities that JRoR open up include ease of deployment and access to the full set of Java libraries that currently have to be re-implemented in the Ruby environment. For example, you don't need to install mod_ruby - just deploy your JRoR app as a .war file. And if you wanted to use, say, Hibernate instead of ActiveRecord, that would be possible.
Ruby is a pure OO dynamically typed interpreted language. It's defined by the open source C implementation - there's no formal specification. It was started in 1993 by Yukihoro 'Matz' Matsumto, but only recently became popular due to the ascendence of the Ruby on Rails (RoR) framework.
JRuby is implemented in Java, and is open source (GPL/LGPL/CPL). It uses native threads, and runs on Java SE versions 1.4.2 or higher. The project was originally started in the fall of 2001 (based on Ruby 1.6) but now implements nearly a full Ruby 1.8 feature set.
The authors want to make using Java a natural part of JRuby. As part of that, JRuby allows you to:
- Import java classes into Ruby
- Rubify Java code (it maps core number, string, and list types, rubifies method names, and adds common ruby methods to core types)
- Implement Java interfaces from Ruby
- Use Ruby from Java code using BSF (a JSR-223 implementation exists too)
- Run with Ruby's standard libraries
- Use native threading (also Ruby 2.0 will do this)
Ruby is an elegant, powerful language. JRuby gives to Ruby Java technology's capabilities, and JRuby gives to Java technology Ruby's capabilities. It's another tool for the developer's toolbox, and demonstrates that the Java VM, like .NET CLR, can support many languages.
JRuby is ready for use today, and will only improve in the future. For more information see www.jruby.org.
Editorial standards