Expected blah/active_record/connection_adapters/oracle_enhanced_adapter.rb to define ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter

17 views
Skip to first unread message

Mattia

unread,
Dec 14, 2008, 9:15:14 PM12/14/08
to Oracle enhanced adapter for ActiveRecord
Hi everyone,

I saw it Ray's blog as well:

Expected /Library/Ruby/Gems/1.8/gems/activerecord-oracle_enhanced-
adapter-1.1.8/lib/active_record/connection_adapters/
oracle_enhanced_adapter.rb to define
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter

The problem might be related to Rails file/class naming convention. I
found that the problem is the big begin/rescue block around the module
declaration. If you add an empty definition just before that it just
work:

<code>
module ActiveRecord
module ConnectionAdapters #:nodoc:
class OracleEnhancedAdapter < AbstractAdapter
end
end
end

begin
require_library_or_gem 'oci8' unless self.class.const_defined? :OCI8
...
</code>

Alternatively removing the begin/end block helps too.

cheers
-- mattia
Reply all
Reply to author
Forward
0 new messages