On 11/20/07, Pete Helgren <[EMAIL PROTECTED]> wrote: > Trying to sort out the relationships between activerecord, > activerecord-jdbc-adapter and how to make sure everything is properly > configured. Right now I am using jruby 1.1b1 and activerecord-jdbc 6.0 > and active_scaffold. I think I have everything correctly configured but > I get the following error when I execute the server script: > > => Booting WEBrick... > E:/jruby-1.1b1/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:210:in > `establish_connection': database configuration specifies nonexistent > as400 adapter (ActiveRecord::AdapterNotFound) > > So it doesn't find the as400 adapter I have specified in the > database.yml file. How do I resolve this? What is throwing me is the > references to activerecord-1.15.5. Shouldn't it be looking in > activerecord-jdbc-adapter-0.6 ?
The basic convention is this. You have an adapter name "foo", from which Rails expects to find the following: - should be able to require 'active_record/connection_adapters/foo_adapter' - (if it's Rails 2.0 and that didn't work, try to load gem 'activerecord-foo-adapter' and try again) - the required library above should define a new class method on ActiveRecord::Base called foo_connection, which when called with a config hash (from database.yml) should return an instance of a subclass of ActiveRecord::ConnectionAdapters::AbstractAdapter. /Nick _______________________________________________ Jruby-extras-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/jruby-extras-devel
