Forum: Ruby on Rails AR 1.14 oracle_adater.rb does not work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
332ae344000d6e5a959a3bfb199a449f?d=identicon&s=25 Jean-Jacques Mahe (Guest)
on 2006-03-29 13:18
the error is :
wrong number of arguments (1 for 0)
where :
active_record/connection_adapters/oracle_adapter.rb:53:in
`attributes_with_quotes_pre_oracle'

this method is new, it was an alias in the previous version :
      alias :attributes_with_quotes_pre_oci :attributes_with_quotes
#:nodoc:


I replaced the method by the alias of the previous version, and it is
working fine.
This is the code (s/oci/oracle/) :
      alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
#:nodoc:
65aeac90fac249f8bb75dff5cb279476?d=identicon&s=25 Jason Hale (jdhale)
on 2006-03-29 18:19
Jean-Jacques Mahe wrote:
> the error is :
> wrong number of arguments (1 for 0)
> where :
> active_record/connection_adapters/oracle_adapter.rb:53:in
> `attributes_with_quotes_pre_oracle'
>
> this method is new, it was an alias in the previous version :
>       alias :attributes_with_quotes_pre_oci :attributes_with_quotes
> #:nodoc:
>
>
> I replaced the method by the alias of the previous version, and it is
> working fine.
> This is the code (s/oci/oracle/) :
>       alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
> #:nodoc:

I am also having problems with the Oracle adapter.  I followed the
instructions from the book Rails Recipes on connecting to multiple
databases.  The primary database I am using is MySQL and the secondary
is Oracle.  I have a base class defined like this:

class ConferenceBase < ActiveRecord::Base
  establish_connection :conference
end

A few other model classes then inherit from this class.  As of Rails 1.0
this seemed to work.  Now I get the following error when I use the
inherited models:

ORA-04043: object conference_bases does not exist

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:541:in
`object_info'
    (eval):3:in `object_info'
    C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:365:in
`columns'
    C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:696:in
`columns'
    C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:704:in
`columns_hash'
    C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1817:in
`define_read_methods'
    C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1769:in
`method_missing'
    #{RAILS_ROOT}/app/views/projects/_form.rhtml:41:in
`_run_rhtml_projects__form'
...


Can anyone confirm this error?

-Jason
E75cda3e915fa209386fae3de962cb6a?d=identicon&s=25 Michael Schoen (Guest)
on 2006-03-29 19:57
(Received via mailing list)
A patch has been posted already, waiting for it to be applied.
This topic is locked and can not be replied to.