Upgrading from rails 1.1.6 to 2.3.2; problems with activerecord-oracle-adapter

I’m upgrading from rails 1.1.6 to 2.3.2 and having problems with
activerecord-oracle-adapter.
Following are the ruby, rails & gems versions. “ruby script/about” has
the problems.

$ ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux]

$ rails -v
Rails 2.3.2

$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.2)
actionpack (2.3.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.2, 1.15.6)
activerecord-oracle-adapter (1.0.0.9250)
activeresource (2.3.2)
activesupport (2.3.2, 1.4.4)
cgi_multipart_eof_fix (2.5.0)
composite_primary_keys (2.2.2)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
mongrel (1.1.5)
mongrel_service (0.1)
rails (2.3.2)
rake (0.8.7)
ruby-yui (0.0.5)

$ sqlplus userid/password
[works fine]

edited environment.rb
##RAILS_GEM_VERSION = ‘1.1.6’
RAILS_GEM_VERSION = ‘2.3.2’ unless defined? RAILS_GEM_VERSION

edited database.yml:

adapter: oci

adapter: oracle

$ ruby script/about


  * config.breakpoint_server has been deprecated and has no

effect. *


/usr/local/lib/ruby/gems/1.8/gems/activerecord-oracle-
adapter-1.0.0.9250/lib/active_record/connection_adapters/
oracle_adapter.rb:575: undefined method define_a_column' for classOCI8::Cursor’ (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:inrequire’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:156:in require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:521:innew_constants_in’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:156:in require' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 71:inestablish_connection’
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
60:in establish_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 55:inestablish_connection’
… 7 levels…
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
commands/about.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:inrequire’
from script/about:3

Quoting sultan [email protected]:

I’m upgrading from rails 1.1.6 to 2.3.2 and having problems with
activerecord-oracle-adapter.

I really suggest you upgrade from 1.1.6 to 1.2.6 first. Rails 1.2.6
has many
checks for deprecated (soon to be dropped) features. When your app runs
without warnings on 1.2.6, then move to 2.x. I’d also suggest a quick
stop at
the latest version of 2.0.x or 2.1.x before jumping to 2.3.2. Much has
changed and trying to untangle it all at once will shorten you life,
your
marriage (relationship), and hair coverage regardless of gender.

HTH,
Jeffrey

Don’t forget rake rails:update to update scripts, config etc.

Colin

2009/5/16 Jeffrey L. Taylor [email protected]

Hi Jeffrey & Colin,

Thanks for your quick response. Just to give you a brief back ground:
Currently we have the application on a “production” box where we make
the client requested changes in the evenings or week-ends. We have
recently got a development box where I installed ruby 1.8.6; rubygems
1.3.3; rails 2.3.2 & ruby-oci8-2.0.1. The application itself is not
very large, so the changes and testing for rails 2.3.2 should not be a
problem.
Regarding the actual problem, I did do “rake rails:update” which was
suggested when I first ran “ruby script/about”. After that, when I ran
“ruby script/about” again, I got the oracle adaptor error message. Is
it a gem installation, configuration or an application problem?

Thanks Joyce. I am a step ahead when I went to ruby-oci8 1.0.4

Now I am struggling with the following:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’: no such file to load – environments/
localization_environment (MissingSourceFile)

On May 17, 11:48 pm, Joyce Z. [email protected]

Rails 2.3 does not work with ruby-oci8 2.0.0.
gem install ruby-oci8 -v 1.0.4

You can find detail info at
http://wiki.rubyonrails.org/database-support/oracle.

sultan wrote:

Thanks Joyce. I am a step ahead when I went to ruby-oci8 1.0.4

Now I am struggling with the following:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’: no such file to load – environments/
localization_environment (MissingSourceFile)

On May 17, 11:48�pm, Joyce Z. [email protected]

Did you ever solve this last problem? I am struggling with the same
issue.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs