Well, you were right. So what did I do wrong? When I downloaded
ruby-oci8-1.0.0-rc1-mswin32 file from the rubyforge site I double clicked on
it and I installed it that way and proceed through answering "Yes" to copy
the OCI files. I did it few times and every times I checked the directories
where the files are suppose to go and they were not copied. Hmmm.. So then I
went to my ruby directory and I did installed it manually from there like
this:

C:\ruby>ruby ruby-oci8-1.0.0-rc1-mswin32.rb
Copy OCI8.rb to c:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8
Copy oci8.rb to c:/ruby/lib/ruby/site_ruby/1.8
Copy oci8lib.so to c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt
OK?
Enter Yes/No: Yes
Copying OCI8.rb to c:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8 ... done
Copying oci8.rb to c:/ruby/lib/ruby/site_ruby/1.8 ... done
Copying oci8lib.so to c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt ... done
OK

Indeed they got copied this time. Tricky..tricky. I also tweaked my
tnsnames.ora file and added SID for my connection as follows:

XE =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = emir-mainpc)(PORT = 1521))
   (CONNECT_DATA =
    (SID = XE))
 )

my code also changed slightly:

require 'oci8'

connection = OCI8.new('username', 'password, 'emir-mainpc:1521/XE')

connection.exec("select * from lnp_tn") do |row|
puts 'dummy: ' + row[0] # outputs "dummy: X"
end
connection.logoff

output:

ruby oracle.rb
dummy: 8008889999
Exit code: 0

Your feedback was certainly helpful and made me do the installation of OCI8
step by step.

Thanks,
Emir.


On 2/16/07, Chris McMahon <[EMAIL PROTECTED]> wrote:

> Thanks for taking the time to look at this. If you are referring to
> Ruby/OCI8 for Oracle, yes I already have that installed. Any other ideas
as
> to how to get this fixed?

Clearly you *don't* have it installed, or else it's installed
improperly.   The message "custom_require.rb:27:in
`gem_original_require': no such file to load -- oci8 (LoadError)."
means that Ruby can't find your oci8 library.

You should probably find a list devoted to whatever OCI8 library you
attempted to install, instead of the Watir list.

-C
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to