JRuby Part II – Initial Observations
After two weeks of playing with JRuby, here’s a short list of things I found:
1- Everything takes longer to load due to Java, but once loaded, it flies compared to MRI.
2- Libxml doesn’t work, but you can use Java’s xml library without any problem. Yes, it’s still faster than ReXML. If you want compatibility with MRI, use Hpricot. I don’t think the sacrifice in performance is that significant depending on your uses.
3- Use “require
4- Hpricot doesn’t load unless I write “require ‘rubygems’”. By the way, it goes for just about every gem I installed. Requiring rubygems seems to be needed for just about everything. This is the case for both Mac and Linux.
I’m really excited by what I’ve seen so far, but I’m just scratching the surface. My next experiment will be creating a simple Rails app and deploy on both MRI and JRuby and see what needs to be adjusted.