You need:
- jruby
- rails (or just active record) gem
- activerecord-jdbc-adapter
If you are using the base jdbc adapter then you need to put jdbc jar in jruby’s classpath. I just copied the jar into $JRUBY_HOME/lib
Then
establish AR connection
use schema dumper
e.g.
require 'rubygems' require 'active_record' ActiveRecord::Base.establish_connection( :adapter => "jdbc", :driver => 'com.ibm.as400.access.AS400JDBCDriver', :url => 'jdbc:as400://hostname', :username => "blah", :password => "secret" ) ActiveRecord::SchemaDumper.dump