New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no such file to load -- oci8lib_191 #24
Comments
What distribution is used for the production machines? As far as I know, the output of the following code is '1.9.1' for all rubies from 1.9.1 to 1.9.3. ruby -rrbconfig -e "puts RbConfig::CONFIG['ruby_version']" |
Hi, I see now that we do not use RVM btw, but this are the Ruby details: $ ruby -rrbconfig -e "puts RbConfig::CONFIG['ruby_version']" As you can see, the output of ruby -rrbconfig -e "puts RbConfig::CONFIG['ruby_version']" is 1.9.2 in our case... So, that means that the following fix should solve it in all cases? Thx, Jarra |
Could you post the distribution version, not the linux kernel version?
No. The following ruby was compiled from source code distributed by ruby-lang.org. $ ruby -v
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]
$ ruby -rrbconfig -e "puts RbConfig::CONFIG['ruby_version']"
1.9.1 |
Hi Kubo, Thanks for your prompt reply. The Debian version is: $ cat /etc/debian_version But after digging a bit deeper, I found out that on our production server, Ruby is indeed compiled from source as well... Thanx, |
IMO, your ruby was compiled with a configure option '--with-ruby-version=1.9.2'. Your issue will be solved by changing lib/oci8.rb as follows but I won't apply it to my code. From: case RUBY_VERSION
when /^2\.0/
so_basename += '200'
when /^1\.9/
so_basename += '191'
when /^1\.8/
so_basename += '18'
else
raise 'unsupported ruby version: ' + RUBY_VERSION
end To: require 'rbconfig' if not defined? RbConfig
so_basename += RbConfig::CONFIG['ruby_version'].gsub(/\W/, '') |
…the ruby ABI version. The latter may be changed by the configure option --with-ruby-version. (github issue #24 reported by suhrawardi)
I have fixed the issue by 63d22a7. Suhrawardi, could you post the output of the following command to ensure that ruby -rrbconfig -e "puts RbConfig::CONFIG['configure_args']" |
Hey Kubo, Here is the output: $ ruby -rrbconfig -e "puts RbConfig::CONFIG['configure_args']" As you can see, both RUBY_VERSION and RbConfig::CONFIG['ruby_version'] both return 1.9.2. Thanks a lot, |
Thank you. I'm now sure the fix is correct. |
Kubo, thank you very much for your help!!! |
Hi,
On our production machines, the lib/oci8lib_192.so is generated, and not a lib/oci8lib_191.so
Because of that, we have to modify the so_basename, so that the correct *.so file is required.
The suffix number indicates the ruby API version.
18 - ruby 1.8.x
191 - ruby 1.9.1 and 1.9.2
19x - ruby 1.9.x future version which will break the API compatibility
case RUBY_VERSION
when /^1.9.1/
so_basename += '191'
when /^1.9.2/
so_basename += '192'
when /^1.8/
so_basename += '18'
else
raise 'unsupported ruby version: ' + RUBY_VERSION
end
require so_basename
Otherwise we get the following error:
no such file to load -- oci8lib_191
On our development machines, the generated file is indeed lib/oci8lib_191.co
What would be the best way to patch ruby-oci8 to solve this issue for once and for all (environments)?
Btw, Our development server is a:
Linux name-dev 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux
and production is a:
Linux name-prod 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
and we use RVM.
Thanks,
Jarra
The text was updated successfully, but these errors were encountered: