InfoQ

News

JRuby 1.0 Released: Bringing Ruby Compatibility to the JVM

Posted by Scott Delap on Jun 09, 2007

Community
Java,
Ruby
Topics
Dynamic Languages ,
Ruby on Rails
Tags
JRuby ,
ActiveRecord ,
Ruby on Rails
JRuby 1.0 has been released. From committer Ola Bini's blog:
...JRuby 1.0 is a major milestone for our project. Our main goal for 1.0 has been Ruby compatibility. We feel this goal has been reached. When we see companies like ThoughtWorks offering commercial support; we know this goal has been reached...It is important to notice that JRuby 1.0 is not the end all of Ruby interpreters. It’s not perfect. This is just the beginning. We now have a very good base to work from. This is were the real work begins. Join us. It will be a fun ride, and JRuby will just get better!

The release marks 9 months since commiters Charles Nutter and Thomas Enebo were hired by Sun. In the time since commiter Ola Bini has also been hired to work on JRuby development by Thoughtworks.

The release is being termed as "Ruby compatible" with all known JRuby bugs causing incompatibilities with Matz's Ruby (MRI) resolved. Applications should "just work" out of the box. Charles Nutter has detailed the post 1.0 development course of JRuby on his blog. In summary:

    Performance
    In the last year speed has been increased by an order of magnitude and a JIT compiler has been enabled. The team will continue to work on improving the JRuby speed and performance.

    Java Integration
    Today libraries can be called, interfaces implemented, and classes extended. Edge cases exist however. A redesigned integration API is targeted for 1.1.

    Ruby 2.0 and Rubinius
    The goal is to support Ruby 2.0 and Rubinius byte code execution soon.

Nutter also reaches out to the community. JRuby is a community project sustained by community involvement. He specifically mentions the RubySpec initiative:

..RubySpec is an effort to build a community-driven specification of Ruby that all users and implementers can freely reference. It is linked from the RubyDoc site and is fast becoming a standard way for the community to record language and library behaviors. I believe this is the best and fastest way for us to form a complete specification of Ruby's behavior...and I believe such a specification is becoming extremely important, what with there now being 5-10 different implementations of Ruby, all guessing at what "correct" is...

On a related note ActiveRecord-JDBC 0.4 has been released to coincide with JRuby 1.0. ActiveRecord-JDBC is a database adapter for Rails’ ActiveRecord component that can be used with JRuby. It allows use of virtually any JDBC-compliant database with your JRuby on Rails application. Version 0.4 adds:

  • Shoring up PostgreSQL (courtesy Dudley Flanders) and HSQL (courtesy Matthew Williams)
  • Fix timestamps on Oracle to use DATE (as everything else)
  • Derby fixes: Fix for open result set issue, better structure dump, quoting, column type changing
  • Sybase type recognition fix (courtesy Dean Mao)

Sun's commitment to Ruby has not just consisted of runtime for the JVM. The Netbeans IDE has been receiving a significant injection of Ruby support the last 6 months from Sun's Tor Norbye. This week he has added Find Usages and Refactoring support:

...Let's say that I want to rename the @comments field in my Rails application controller. I right click on it, choose a new name and hit OK. I then click "Preview", and in the bottom window I get a list of refactoring operations, along with diffs for the currently selected item. I can (and should!) walk through the changes with the Up/Down arrows, and I can unselect any changes that I don't like before I click the Refactor button to apply the changes...

Such features are in the very latest development buillds of Netbeans which can be found in a Ruby IDE form at nbextras.org. More detailed installation instructions can be found on the Netbeans wiki.

Congrats by serge boulay Posted Jun 9, 2007 2:18 PM
Good news by Peter Veentjer Posted Jun 10, 2007 10:04 AM
Exciting by Geoffrey Wiseman Posted Jun 10, 2007 3:10 PM
  1. Back to top

    Congrats

    Jun 9, 2007 2:18 PM by serge boulay

    congrats to the JRuby team (and Netbeans team) for making Ruby a reality on the VM

  2. Back to top

    Good news

    Jun 10, 2007 10:04 AM by Peter Veentjer

    At the moment I'm using Groovy for scripting/prototyping, but (J)Ruby also looks very promising. Good to see that it is so well supported.

  3. Back to top

    Exciting

    Jun 10, 2007 3:10 PM by Geoffrey Wiseman

    Good to see both the release and the roadmap for the future. Exciting.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.