Sunday, January 6, 2008

JRuby 1.1 (trunk) and Rails

At Javapolis 2007 I went to Practical JRuby on Rails to see how compatible JRuby has become compared to the normal Ruby and the Rails framework. The session was good, not great, but I still wanted to look a bit more into JRuby, as I still have trouble letting go the Java background. It just makes sense to reuse all the infrastructure and frameworks that are around for Java and complete this with an agile web development framework such as Rails.

I bought the book "Practical JRuby on Rails Web 2.0 Projects: Bringing Ruby on Rails to Java" and started by getting the latest sources for JRuby (which is currently going for 1.1). From there I got all the latest versions of the little gems you need to get Rails running. But that was perhaps a little mistake. JRuby 1.1 is at the moment not stable enough... There is a lot of activity on trunk and bugs are constantly filled and fixed, but things quite often break. And it is not only JRuby's fault. Gems, Rake, ActiveRecord-JDBC, Mongrel (and all other dependencies) break from day to day. So figuring out what went wrong spoils a little bit of the fun.

The fact that I have Rails 2.0 installed doesn't help either... There are quite some changes, and most books don't cover the latest version. On the other hand, this forces someone to understand the samples and look for a solution... Perhaps that is the reason why I'm still trying out the latest version ;-).

The book itself is less good than I anticipated. Sometimes I miss some details or explanations and so I certainly don't recommend the book if you have never read a book on Ruby or Rails. I do recommend the "The Pragmatic Programmers" series.

No comments: