I am developing a Rails 3.1 application on top of a legacy DB2/400 database. Because of the better support for legacy schemas, I opted to use DataMapper instead of ActiveRecord as the ORM. The application is going to be deployed on JRuby.
What is the best way to access a DB2 database in this case?
My initial research indicated that this would be trivial, since one of the major selling points of using JRuby on Rails is that you get JDBC, and thus access to pretty much any database on the planet.
However, it appears that is not necessarily true, in particular, there doesn't seem to be any driver for either ActiveRecord or DataMapper/DataObjects for using DB2 over JDBC.
Do I have to write my own driver? From reading the source code of the various existing DataObjects/DataMapper JDBC drivers, this shouldn't be too hard, but it is something I'd rather like to avoid.
Is there any ready-made solution (library, gem, blog post, tutorial) for using DB2/400 with JRuby on Rails with DataMapper? If not, how do I do it?