Hi I had a problem during compilation on cygwin32 @ Windows 7. The error during configuration was:
/usr/share/ruby/2.3.0/fiddle.rb:47:in `initialize': No such file or directory (LoadError)
from /usr/share/ruby/2.3.0/fiddle.rb:47:in `new'
from /usr/share/ruby/2.3.0/fiddle.rb:47:in `dlopen'
from /usr/share/ruby/2.3.0/Win32API.rb:15:in `initialize'
from /usr/local/share/gems/gems/ruby-oci8-2.2.3/ext/oci8/oraconf.rb:29:in `new'
It seems that Win32API has a problem opening library advapi32.dll, though it exists in C:\Windows\System32 and this directory is in the $PATH.
I modified the ext/oci8/oraconf.rb (patch attached) so that it uses the native ruby registry access. The native access (Win32::Registry) exists since ruby 1.8.7. Compilation now works fine, though I do not use the ORACLE_HOME from registry. But short test showed that new function enum_homes should work as expected.
Test
#!/bin/ruby
require 'Win32/Registry'
Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Oracle') do |reg|
reg.each_key(){ |h|
puts h
l=reg.open(h)
oracle_home,oracle_home_name = nil,nil
l.each_value { |name,type,data|
oracle_home=data if name == 'ORACLE_HOME'
oracle_home_name=data if name == 'ORACLE_HOME_NAME'
}
puts " HOME_NAME=#{oracle_home_name} HOME=#{oracle_home}"
}
end
Hi I had a problem during compilation on cygwin32 @ Windows 7. The error during configuration was:
It seems that Win32API has a problem opening library
advapi32.dll
, though it exists inC:\Windows\System32
and this directory is in the$PATH
.I modified the
ext/oci8/oraconf.rb
(patch attached) so that it uses the native ruby registry access. The native access (Win32::Registry) exists since ruby 1.8.7. Compilation now works fine, though I do not use the ORACLE_HOME from registry. But short test showed that new function enum_homes should work as expected. TestTest output:
oraconf_cygwin.diff.txt