Thanks to Nick I think I have my head around the relationships in the
activerecord-adapter-jdbc. I decided that I would start with using the
"regular" DB2 adapter, see how that works with DB2 UDB for Windows and
then take a crack at modifying it for System i (AS/400) DB2/400. Don
Parish had made some modifications to the DB2 adapter last summer but
those directions and changes apply to activerecord-JDBC 3.x and I am
trying to get the latest version of activerecord-jdbc-adapter modified
(v 0.6).
SO! I did the following:
I had a working application that connected to mySQL. I created the same
table in in DB2 UDB and then changed the database.yml file to the following:
development:
adapter: DB2
database: mydb
username: user02
password: pass02
host: localhost
I added the following to the environment.rb
if RUBY_PLATFORM =~ /java/
require 'rubygems'
gem 'activerecord-jdbc-adapter'
require 'jdbc_adapter'
require 'active_record/connection_adapters/as400_adapter'
end
(Hopefully that is correct)
When I start the server for the application I get the following:
=> Booting WEBrick...
E:/jruby-1.1b1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
uninitialized class variable @@allow_concurrency in ActiveRecord::Base
(NameError)
I am running jruby 1.1b1. Rails 1.2.5, activerecord-jdbc-adapter 0.6
and Java 5 (1.5.0_10)
I searched on the "variable @@allow_concurrency in ActiveRecord::Base"
error but found nothing useful.
Any ideas?
Pete
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel