Just today I completely wiped my hard drive and installed snow leopard
fresh. I’ve installed several libraries with success so far, but can’t
seem to get oracle working with rails.
I’ve installed the instant client successfully and am able to connect to
the db using irb:
$ irb
require ‘oci8’
=> trueOCI8.new(‘user_name’, ‘password’, ‘//server/xe’).exec(‘select column_1 from table_name’){|r| puts r.first}
“value1”
but I can’t get it to work with a Rails 1.2.5 project:
$ script/console
Loading development environment.
/Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/oracle_adapter.rb:537:NameError:
undefined method define_a_column' for class
OCI8::Cursor’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/module/aliasing.rb:28:in
alias_method':NameError: undefined method
process’ for class
ActionController::Base' /Users/kpeyton/projects/dfttracker/app/controllers/application.rb:8:NoMethodError: undefined method
hide_action’ for ApplicationController:Class
This is a little snapshot of what gems I have installed right now.
*** LOCAL GEMS ***
rails (2.3.4, 2.2.2, 1.2.6, 1.2.5)
rsim-activerecord-oracle_enhanced-adapter (1.2.1)
ruby-oci8 (2.0.4)
I’m not able to downgrade my ruby-oci8 install to 1.x because I need 2.x
for a different project with rails 2.3.4. Can anyone help me with
getting this oci8 to work here?
Thanks alot.
-Kyle