Rails3: ActiveRecord-OracleEnhanced-Adapter and jruby

Donnerstag, 28. April 2011, 13:00 Uhr | roberto@vasquez-angel.de |

I’m trying to get the oracle enhanced adapter to work on rails3 and jruby. No success till now.

When I try to open a rails console I get following error:

$> rails console
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::AbstractAdapter

Documentation is here

Update: You have to add an oracle initializer (Rails.root/config/initializers/oracle.rb)to get it working:

ActiveSupport.on_load(:active_record) do 
  ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.class_eval do
  .
  .
  .
  end
end