Join GitHub today
no such file to load -- oci8lib_191 #24
On our production machines, the lib/oci8lib_192.so is generated, and not a lib/oci8lib_191.so
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
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
Btw, Our development server is a:
and production is a:
and we use RVM.
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']"
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?
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
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...
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.
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
require 'rbconfig' if not defined? RbConfig so_basename += RbConfig::CONFIG['ruby_version'].gsub(/\W/, '')
added a commit
Dec 16, 2012
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']"
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,