Rails support progress for JRuby

FYI, I've been keeping an updated page of Rails test run results with JRuby at the following URL

http://www.headius.com/jrubywiki/index.php/Rails_Support

The bottom line is that ActionPack/ActiveSupport/ActionMailer are nearly 100%, ActiveRecord is probably 2/3 working (but the failures include tests for Oracle, PgSql, Firebird...), and most of what we'd expect to work in Railties works pretty well. I haven't primed the pump to run ActionWebService tests yet.

Also, a quick explanation of the color scheme:

green = passing 100% (obvious) yellow = passing 75% or better red = passing less than 75% blue = errors in both Ruby and JRuby when run individually grey = not supported, perhaps never supported by JRuby

We have been targeting 1.1.6 support for the moment, but will soon start testing against 1.2 and eventually against trunk. I wouldn't imagine the compatibility profile will change that much by switching versions; we're mostly talking about pure Ruby here.

Note that the use of SQLite in many places in the test causes quite a bit of trouble for JRuby since SQLite support on Java is minimal at best. The ability to swap out SQLite for something equivalently simple (DBI or JDBC with Derby/JavaDB, perhaps?) would make it easy to run those tests.

Of course, if any of you are Java devs and would like to help us get things running, we'd certainly appreciate it. I've debugged and traced through enough Rails code to know that having more expert folks contributing would really help.

Thank you!

[snip]

Note that the use of SQLite in many places in the test causes quite a bit of trouble for JRuby since SQLite support on Java is minimal at best. The ability to swap out SQLite for something equivalently simple (DBI or JDBC with Derby/JavaDB, perhaps?) would make it easy to run those tests.

Of course, if any of you are Java devs and would like to help us get things running, we'd certainly appreciate it. I've debugged and traced through enough Rails code to know that having more expert folks contributing would really help.

Thank you!

Charles,

One other option for an in-memory database for testing is HSQLDB, which in a previous java-life I used quite a bit for test suites. If I recall correctly, it supports at least as much of the SQL standard as sqlite does, and is pretty easy to get up and running.

- Rob

Just to be clear, ActiveRecord-JDBC already works with both Derby/JavaDB and HSQLDB, and I believe it also supports migrations. Mainly what we'd need is a simple way to run tests that depend on SQLite against something other than SQLite. I just don't know how to make that happen without directly modifying the tests.

I've been using ActiveRecord-JDBC to hit MySQL for the AR tests, so AR-JDBC is doing very well at this point.

I may be missing something here, but I don't see why you'd want to run tests against a database they are not intended for.

Kind regards, Thijs

PGP.sig (186 Bytes)

Thijs van der Vossen wrote:

I may be missing something here, but I don't see why you'd want to run tests against a database they are not intended for.

Perhaps I'm mistaken, but the tests in question don't appear to be intended to test SQLite specifically. Rather, they are to test the ActiveRecord-based session store, some AR assertions, and pagination of results. None of these are specific to SQLite, but the base unit and a couple of the test cases use SQLite explicitly, so there's no way to run them against HSQLDB or Derby without modification.

- Charlie