I played with JRuby and Rails this weekend.
I’m trying to create a standalone JAR that contains Jetty and a Rails application so that you can fire up a server using java -jar railsapp.jar, like you can do with Hudson. This involves taking the existing work that allows you to bundle your Rails application into a WAR (which can be deployed to a server) a bit further. I haven’t quite figured out how to configure Jetty to do this yet. It seems Jetty’s WebAppContext wants to be configured with a directory that contains the web application. I’ve asked on the Jetty mailing list for some tips.
I choose redMine at random for my experiments. I couldn’t get redMine to create its database with Apache Derby, due to some issue with DATEs and TIMESTAMPs. Getting this to work would be great, since then you have a server-in-JAR that is completely standalone.
However, everything worked fine with MySQL over JDBC. Running redMine under JRuby using WEBrick worked great (after a minor workaround for JRUBY-964), but I had an issue with it failing to start when deployed as a WAR, due to some problem with the IConv.open method. I’ll investigate this a bit more.
Along the way, I submitted two JRuby bugs (JRUBY-954, JRUBY-964), commented on JRUBY-925 and produced a simple test case for JRUBY-956, which is a bug the Mingle folks ran into. I also did some debugging of JRUBY-822.
Along the way, this Rails Cheat Sheet came in handy, since I haven’t looked at Rails since 2005.