I am developing a Rails 3.1 application on top of an outdated DB2 / 400 database. Because of the better support for legacy schemas, I decided to use DataMapper instead of ActiveRecord as ORM. The application will be deployed to JRuby .
What is the best way to access the DB2 database in this case?
My initial research showed that this would be trivial, since one of the main advantages of using JRuby on Rails is that you get JDBC and thus get access to almost any database on the planet.
However, this does not seem to be true, in particular, there is apparently no driver for ActiveRecord or DataMapper / DataObjects for using DB2 over JDBC.
Do I need to write my own driver? From reading the source code of various existing JDBC DataObjects / DataMapper drivers, this should not be too complicated, but it is more likely to be avoided.
Is there a ready-made solution (library, gem, blog post, tutorial) for using DB2 / 400 with JRuby on Rails with DataMapper? If not, how do I do this?
source share