I have written the small script below. I have the ruby-oci adapter
installed, the newest version of gems and the newest version of
ActiveRecord. When I run the code I’m getting the follow error following
my code. It seems to be an issue with gems as far as I can tell. Any
help?
Thanks,
Drew
Code:
require ‘ruby_gems’
require ‘active_record’
ActiveRecord::Base::establish_connection(
:adapter=>“oci”,
:host=>"***",
:database=>"***",
:user=>"***",
:password=>"***")
class Employee < ActiveRecord::Base
set_table_name “EMPLOYEE”
end
Employee.find(:all).each do |emp|
puts emp
end
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:51
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in ge m_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
re
quire’
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_suppo
rt/dependencies.rb:495:in require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_suppo rt/dependencies.rb:342:in
new_constants_in’
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_suppo
rt/dependencies.rb:495:in require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_suppo rt/core_ext/kernel/requires.rb:7:in
require_library_or_gem’
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_suppo
rt/core_ext/kernel/reporting.rb:11:in silence_warnings' ... 9 levels... from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_recor d.rb:80 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
ge
m_original_require’
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `re
quire’
from models.rb:2