D
Drew Olson
All -
I'm attempting to write a data validation program using ActiveRecord and
connecting to an Oracle 10g database. I've downloaded the ruby-oci8
package, double clicked it to install, and written a simple program
(shown below). However, when I run the program, I get a pop up with the
following error: This application has failed to start because OCI.dll
was not found. Re-installing the application may fix this problem. Also,
this is the error shown on the console after the application exits:
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/connection_
adapters/oracle_adapter.rb:685:in `oci_connection': Oracle/OCI libraries
could n
ot be loaded: 126: The specified module could not be found. -
c:/ruby/lib/ruby
/site_ruby/1.8/i386-msvcrt/oci8lib.so (LoadError)
Any ideas? I'm confused because when I doubled clicked the ruby-oci8
package, I know it placed oci8lib.so in
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/oci8lib.so. I'm on a windows
box.
Thanks,
Drew
require 'rubygems'
require 'active_record'
ActiveRecord::Base::establish_connection(
:adapter=>"oci",
:host=>"*****",
:database=>"*****",
:user=>"*****",
assword=>"*****")
class Employee < ActiveRecord::Base
set_table_name "EMPLOYEE"
end
Employee.find
all).each do |emp|
puts emp
end
I'm attempting to write a data validation program using ActiveRecord and
connecting to an Oracle 10g database. I've downloaded the ruby-oci8
package, double clicked it to install, and written a simple program
(shown below). However, when I run the program, I get a pop up with the
following error: This application has failed to start because OCI.dll
was not found. Re-installing the application may fix this problem. Also,
this is the error shown on the console after the application exits:
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/connection_
adapters/oracle_adapter.rb:685:in `oci_connection': Oracle/OCI libraries
could n
ot be loaded: 126: The specified module could not be found. -
c:/ruby/lib/ruby
/site_ruby/1.8/i386-msvcrt/oci8lib.so (LoadError)
Any ideas? I'm confused because when I doubled clicked the ruby-oci8
package, I know it placed oci8lib.so in
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/oci8lib.so. I'm on a windows
box.
Thanks,
Drew
require 'rubygems'
require 'active_record'
ActiveRecord::Base::establish_connection(
:adapter=>"oci",
:host=>"*****",
:database=>"*****",
:user=>"*****",
class Employee < ActiveRecord::Base
set_table_name "EMPLOYEE"
end
Employee.find
puts emp
end