New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

JRuby on Grails?

| by Sebastien Auvray on Mar 15, 2007. Estimated reading time: 1 minute |

In the beginning God created Ruby. Ruby came with many new possibilities, but was without a good web application framework. God said "there should be Rails" and Rails came into existence.

On the second day came a lot of fuss about Rails.

On the third day Grails was born.

Grails follows the Rails way of "coding by convention", using Groovy, an agile dynamic language for Java. Grails is 15% made of Groovy (the rest being Java) while Rails is 100% Ruby, hence Grails can not be properly called Groovy on Rails. Starting from that simple observation, Charles Nutter, one of the JRuby developer from Sun wonders how Grails could be extended to support any scripting language, especially Ruby.

I decided to do this exploration after realizing there's nothing about Ruby or JRuby that couldn't be used to wire a bunch of Java libraries together--indeed, that's one of the biggest selling points of JRuby, the fact that you can write plain old Ruby code but call Java libraries almost seamlessly (with day-by-day improving integration points and performance numbers). So why not take Grails and do a port to Ruby? Groovy code isn't far off from Ruby in many ways, and everything you can do in Groovy you can do in Ruby (plus more), so the port should be pretty straightforward, right?

Charles wants the best of both worlds: Multi-Language ability with the rich support of existing Java libraries. Graeme seems to be eager to stay in the "Java-Land".

In a straightforward answer, Grails founder Graeme Rocher after making advertising for his framework, tends to answer that the support of other language in Grails is just a matter of available resources, and harshly criticizes Sun's investment in "dead-end projects" such as Phobos.

The quarrel eclipses a major root question: Do we turn the page and move from a 100% Java world to 100% Ruby ? Charles (Sun) and Graeme don't want that and bring their own solution.

Now why not just use the 100% Ruby On Rails solution, and constantly build new Ruby libraries around it while the performance (something it is being criticized for today) is being improved? Can the standalone Ruby and Rails couple survive Sun's orientation? The IT world will make its choice in the near future.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Voting on Ruby and Rails by Matthieu Riou

Grails are followers, they could have had a chance if Rails had failed to execute as well as it has in the past but Rails 1.2 is better than ever (restful is the term I guess). The Java world seems to be very inward oriented and several Java developers (usually the eternal skeptics) just refuse to see Ruby *and* Rails advantages. However Sun seems to don't mind as much as they're shooting for the universal VM even if this time they have no control over the language.

Ruby is a very healthy community, much like the Linux community has been for years (benevolent despot syndrom?), it's an important advantage because it prevents them from shooting in their own foot. It also protects them from those who talk more than they write code.

So with all that, the new performance figures of Ruby 1.9 (especially when compared to JRuby), the growing acceptance of Rails in the enterprise, I'd bet a lot on Ruby and Rails. And not much on Sun.

Re: Voting on Ruby and Rails by Steve Zara

That is a very one-sided comment. Ruby remains a relatively low-performance language, and application development is far, far more than just a matter of writing relatively small websites. Some in the Ruby world can be just as inward-directed, and refuse to see any advantages in the performance, robustness and versatility of Java. There is a very good future for Ruby, Rails and also for Java.

Re: Voting on Ruby and Rails by Kenneth Kousen

I really like Ruby and I'm quite impressed with Rails, but as a developer with a major investment in Java it's been a much easier transition for me to learn Groovy and Grails. The fact that Grails is based on Spring and Hibernate also helps me a lot, because I'm pretty familiar with both projects. I especially like that I can take a Grails app and export it as a war file, so all my deployment problems with Rails go away.

That said, Rails is clearly more mature and quite powerful. Ruby, too, is a very impressive language. I wish I was an expert Ruby developer and will continue to re-visit it over time. I think my future lies with Groovy, though. It's so much easier for me and connects to everything I already have.

Re: Voting on Ruby and Rails by Jesse O'Neill-Oine

I'm in the same boat as Kenneth. Ruby/Rails is attractive for many reasons, but it just feels like I'd be losing too much of the knowledge that I've built up over the past 10 years. Learning Ruby the language is trivial, but learning all of the associated libraries is more than a little daunting since already have that knowledge on the Java front. I also am finding that a lot of clients of mine need Java integration and while JRuby would eventually provide that, I get it instantly and easily with Groovy.

Re: Voting on Ruby and Rails by Jason Warner

I have been doing Ruby/Rails programming for over a year but I just started doing Groovy/Grails about a month ago (more as a fun little exercise since I come from the java world). Groovy and Grails are AWESOME.

Ruby is a great language and Rails is a great framework for the language, but Groovy/Grails is going to be the solution that Ruby/Rails could never be because of language limitations. Honestly, I urge everyone to look at it. Everyone who is currently doing Ruby/Rails, everyone who is struggling with Rails deployment or Ruby speed issues; look at Groovy/Grails.

At this point, I doubt that Groovy/Grails will ever reach the heights that Rails has soared to (by pure hype...sure it is a great framework, but the hype is what made it climb so high...and I'll be the first to admit that), but I think Groovy/Grails will change Java and enterprise development for the better.

Re: Voting on Ruby and Rails by Steve Zara

Everyone who is currently doing Ruby/Rails, everyone who is struggling with Rails deployment or Ruby speed issues; look at Groovy/Grails.

At this point, I doubt that Groovy/Grails will ever reach the heights that Rails has soared to

I think this is an interesting point. After following Rails for some time, I am not sure what heights it has supposed to have reached. Checking on job sites, to see if it has made any major progress as a commercial development tool, I just don't see much change over the past year. Has tooling improved? Well, I still see articles discussing the use of irb (do we see articles talking about Java debugging using jdb?). Performance has not improved for stable versions of Ruby. My impression, for what it is worth, is that much of the hype is fading, and will fade a lot more as some of the ideas of Rails are adopted by more widely used platforms.

My take on Grails and JRuby on Rails by Steven Devijver

I discussed shared efforts for integrating with Java libraries (Spring, Hibernate, what-not) briefly with Charles some months ago. The conclusion was that the effort to make any integration efforts work seamlessly for both JRuby on Rails and Grails would be too hard.

Right now several people lead by Graeme are spending a lot of their free time on a stable Grails. This really requires a lot of work. Grails is currently 0.4.2 and to get to 1.0 will still require a lot of work.

Many of the features that Grails 1.0 has to have are already in 0.4.2 today. However, the entire framework has to become more stable, better integrated and faster.

As I said before this requires a lot of work and that's to get direct integration between framework X and Grails stable. Imagine the effort if would take to make the same stable for Grails and JRuby on Rails.

JRuby and Groovy are very different languages, both in feature sets and internally. JRuby on Rails and Grails on top of that are very different frameworks. The way they integrate with the underlying language bears little resemblance.

The fact that Grails is largely written in Java is for a part of my doing. The very first version was entirely written in Java and when Graeme took over he added a lot of Groovy integration.

The thruth is that we understand Groovy much better today than at the start and Groovy also has became more stable. Don't forget that Groovy become 1.0 some months ago. So writing parts of Grails in Groovy makes much more sense now then it did at the start of Grails.

Grails is inspired by Ruby on Rails but since its inception it's been designed to be a different animal. Actually, the fact the Charles is looking for a similar feature set for JRuby on Rails to me says a lot of the heading Grails is taking.

To me Grails is a shot in the rose. There are areas that need to be improved - the most important one for me is better debugging options - but since Sun is not backing Groovy or Grails this may still take some time.

However, as Grails approaches 1.0 it's popping up in more enterprises every day. For me that's natural because Grails has been designed for this. People want to use these kind of frameworks because they are very easy to use and offer the blended approach (I also like to call it The Perfect Mix): Java or Groovy, the choice is yours. You decide which language goes where in the mix that is your applications.

The idea that Grails is an insignificant follower of Rails is the right of its beholders. However, it's far from the thruth and as time and effort spend on Grails continues this will become more and more apparent.

I expect that as Grails 1.0 approaches companies - probably not Sun - will understand this and adapt. Since I started working with Grails - since Grails became stable enough to write applications with it - I can't go back to building web applications with Java. Grails is toxic in that respect.

A toxic mix designed to trive in the enterprise, that is Grails to me.

Groovy vs Ruby/JRuby by Roger Voss

Despite all the constant bashing of everything Java from much of the Ruby camp, the plain reality is that the Java platform is this incredible embarrassment of riches. The value of building enterprise systems on top of the Java/JVM platform exceeds any competing system/technology.

Enterprise IT does not live on the Web CRUD app alone (i.e., Ruby/Rails). RAD technology to churn out such is certainly nice but such will never rule the IT landscape. Despite the hype of Ruby/Rails, it can't even make a measurable dent in that enterprise IT landscape as a strategically deployed technology.

The Java/JVM platform, though, has the breadth and maturity for indeed ruling the enterprise IT universe. Groovy/Grails/GWT will now nail the web app space (from the Java/JVM perspective) while doing so as a entirely natural extension/evolution of either the Java language, the JVM runtime, or both. (GWT may seem odd to include here, but at rock bottom it is a Java and JVM technology too as its wonderful debugging capability is predicated on leveraging the JVM and Java IDEs. Then it has the genius stroke of converting the quagmire of the HTML, DHTML, JavaScript, CSS, XmlHttpRequest, and JSON all into a very nice Java-couched development process. So now the masses can easily do advanced AJAX web programming ala Visual Basic for Windows over a decade ago.)

JRuby has way too many issues with respect to Java and the JVM when compared to Groovy. The bulk advantages of goodness of the Ruby language can be had in the Groovy language programming experience. Groovy certainly has some of its own special sauce to add to the mix as well.

Ruby itself, though a good language, has the curse of a pathetic C runtime. Been there and done that bit with the Perl C runtime. The many negative issues of a C runtime very much propelled my adoption of Java on the JVM. All the same problems still apply with respect to the Ruby C runtime - and those problems are completely intrinsic to the approach taken here. The Ruby C runtime vs the JVM - as used for a foundational enterprise platform? This question can't even be seriously entertained, i.e., the Ruby C runtime is not even a contender in the realm of strategic enterprise IT.

So when one is already entrenched in the Java/JVM platform universe as the substrate of their enterprise IT, and then the matter of Groovy, Ruby, or JRuby is raised, Groovy is the only conceivable choice between these three.

Sun, foolishly - being down on their luck and desperate to be relevant - succumbed to the Ruby hype machine. The people that live Java/JVM enterprise IT aren't so foolish, though. Get outside the echo chamber of JavaOne - such as No Fluff Just Stuff conferences - and is all Groovy/Grails/GWT/Spring. Ruby has fallen off the edge of the world since two years ago. Only Sun is left flogging that horse now via trying to pimp JRuby to the gullible. Sun in its glory days had a strong technical bent. Maneuvers like JRuby highlight how they're now a company that emphasizes marketing ploys (sizzle instead of value-based steak).

Re: Voting on Ruby and Rails by Obie Fernandez

There are more job postings for Rails now than there have ever been. Check or

Also, irb is an interactive console that is used for much more than debugging, which makes your tooling argument invalid.

Re: Voting on Ruby and Rails by Obie Fernandez

Roger, Ruby has been the darling of the No Fluff Just Stuff set for a couple of years and your comment that Ruby has "fallen off the edge of the world since two years ago" is so wrong as to be completely laughable. Please take your blatant FUD back to JavaLobby where it will be more readily accepted.

Re: Voting on Ruby and Rails by Roger Voss

Obie, I go to the No Fluff Just Stuff every year. Two years ago you're right, Ruby was practically the center-piece of the conference. Dave Thomas was out in force teaching Ruby and Rails. Bruce Tate was around talking up Beyond Java and a good dose of Ruby (plus smalltalk and continuations). Ruby was very much predominate in ad hoc discussions and hallway talk.

The last one, though, was a complete reversal. This time many a presenter had some sort of Groovy angle - and of course there were Grails sessions. Ruby got mention by presenters in terms of praising good things about the language, blah, blah, blah. Nothing much in the way of Ruby figuring into any presentations, though. Comparatively, Ruby really did fall off the edge of the Earth in terms of conference mind share.

Even the presenter panel sessions brought up Groovy in a good deal of the conversation that went on in that venue. One panel participant (when panelist were asked to make prognostications) made the prediction that 2007 would be the year of Groovy. In contrast, Ruby never got any particular attention in the panel discussions.

The one thing I've noticed about No Fluff Just Stuff conferences (beside that they are a better conference than Sun's Developer Days), is that there is a kind of almost anti-Sun sentiment that permeates them. A lot of folks that present there don't display any qualms about casting dispersions toward Sun for what they perceive as boneheaded things that that company does with respect to Java.

In the end it was not really all that strange to see the company behind the No Fluff Just Stuff conference become a sponsor of Groovy development. They, of course, are a sponsor of Spring-centric conferences too. These are two major themes that represent the Java community alternative to Sun boneheadedness: Groovy instead of JRuby and Spring instead of unadorned JEE app servers.

Is it really FUD to just simply tell it like it is? Sorry for bruised egos and hurt feelings. Ruby fanboyism's self-conceit needs to be balanced with a bit of reality now and then.

Re: Voting on Ruby and Rails by Steve Zara

Regarding jobs - fair enough, there are more, but this is hardly the 'Ruby on Rails will take over the world' situation that many were suggesting a while ago. Let's put those 1,000 or so Rails jobs on in perspective: there are over 11,000 PHP jobs and 40,000 J2EE jobs. Even LISP and Smalltalk have several hundred entries listed there.

And as for irb - I can't see how that invalidates my tooling argument. I abandoned command-line-based development years ago.

Re: Groovy vs Ruby/JRuby by Hani Suleiman

One small correction Roger, I've been involved this year in the talk selection process at JavaOne, and I can assure you that there are talks about groovy, grails, GWT, and many Spring ones. So I don't think that comment was entirely accurate.

Re: Groovy vs Ruby/JRuby by Roger Voss

(Ut-oh - is Hani...)

Ah, the Sun Developer Days, though, is a basically a traveling road show featureing EJB3, and where JRuby is the darling of Rich Green's key note slide show. When Rich talks about JVM scripting languages, he touts Sun's long term strategy revolving around JRuby, will even mention JavaScript (Rhino), yet Groovy never appears on a slide or gets any verbal mention.

So technically, my last posting - the one I believe you're responding to - mentions Developer Days instead JavaOne, and is thus accurate.

Re: Groovy vs Ruby/JRuby by Sebastien Auvray

You should have a look at Sun Tech days agenda before talking non-sense again... Guillaume Laforge, Groovy author will make a presentation there next week.
It seems as if Grails (aggressive) community/developers were the imaginary victim of Sun every time, it is becoming really amusing...
Graeme Rocher said recently :

As for whether we love Ruby/Rails, of course we do, a lot the inspiration for Groovy comes from the Ruby community just as the inspiration for builders comes from the Groovy community. I've said before the Grails naming is unfortunate and in hindsight we should have chosen a different name, nevertheless the brand works for us now.

I really wonder what had happened when Grails is called differently... For sure a lot less of fuss...

Re: Groovy vs Ruby/JRuby by Guillaume Laforge

You should have a look at Sun Tech days agenda before talking non-sense again... Guillaume Laforge, Groovy author will make a presentation there next week.

I'm there only because I insisted and proposed my services. Otherwise, Sun would only speak about their own language projects. I can't blame them for that since most talks are done by Sun engineers, it's fairly logical that they speak about what they know best: their own stuff.

By the way, if you're at the TechDays, don't forget to come and say hi!

It seems as if Grails (aggressive) community/developers were the imaginary victim of Sun every time, it is becoming really amusing...

Hmmm, interesting. I wonder in what way the Grails developers or community are aggressive. I'm certainly biased, of course, but we see more Rubyists complain about Grails than the reverse situation. And I don't think they are victim of Sun, I don't see in what way they would be.

Re: Groovy vs Ruby/JRuby by Sebastien Auvray

Hi Guillaume,
I'll attend Tech Days and won't miss for sure the TD1202 about JVM scripting.
See you there!

Re: Groovy vs Ruby/JRuby by Graeme Rocher

Guillaume Laforge, Groovy author will make a presentation there next week.
It seems as if Grails (aggressive) community/developers were the imaginary victim of Sun every time, it is becoming really amusing...

Few points here. First of all I don't think Sun in general are ignoring Groovy & Grails and I thank them for offering to host the Grails event that was held at Sun tech days (ref:

There is, however, most certainly an internal group of people that are pushing JRuby and pushing it hard. This is fair enough because if they don't push it they're going to look mighty stupid for hiring the developers behind the project. There is nothing to argue against here.

As for Groovy/Grails people being "aggressive", I find this amusing. When the Ruby/Rails community is "aggressive" they're applauded for promoting "opinionated software". Are we to just shut-up when there are real posts like Charles' stating that Groovy adds no value to Grails? Come on, get real.

This is what makes posts like this one from Tim Bray so disappointing:

Besides his generally unintelligent comment about the posts, is Tim really claiming that Ruby/Rails has "made friends along the way" as part of its success strategy?

Finally, @Hani I think the JavaOne selection committee have done a great job and Groovy/Grails is well represented at this years event. Well done.

Re: Voting on Ruby and Rails by Piero Sartini

Has tooling improved? Well, I still see articles discussing the use of irb (do we see articles talking about Java debugging using jdb?).

There is NetBeans 6 with full Ruby support.
Personally I think ruby is a nice language and I will do some smaller web-only projects with it. Maybe I am wrong, but for me ruby is a "better" or cleaner PHP/Python/etc

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

19 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and dont miss out on content that matters to you