Ruby-oci8 2.0.6

Ruby-oci8 2.0.6 is released. This is the Oracle module using OCI8 API.

http://rubyforge.org/projects/ruby-oci8/

Though I released 2.0.5 two days ago and said “The next release will be
2.1.0…”, here is a new 2.0.x. It includes the following two issues.
If there was only one of them, I won’t release a new one.
But there are two. It is worth to do.

  • Fixed issues

    • fix SEGV when freeing a temporary LOB during GC on rubinius 1.2.3.

    • revert the exception type from RuntimeError to OCIException when
      a closed OCI handle’s method is called. It was chaned in 2.0.5
      by mistake.

I am having trouble getting oci8 to load.

CentOS 5.6
Ruby 1.9.2
OCI8 2.0.6
Ruby installed with RVM
(set Oracle environment variables)

$ gem install oci8
Building native extensions. This could take a while…
Successfully installed ruby-oci8-2.0.6
1 gem installed
Installing ri documentation for ruby-oci8-2.0.6…
Installing RDoc documentation for ruby-oci8-2.0.6…

Yet when I try to use it in any context I get…

$ ruby -r oci8
puts ‘Hello world!’
internal:lib/rubygems/custom_require:29:in require': no such file to load -- oci8 (LoadError) from <internal:lib/rubygems/custom_require>:29:inrequire’
$

I’m fairly sure I’m missing something trivial but being an admin (not a
ruby developer) I’ve no idea what. Does ruby need an LD_LIBRARY_PATH
element to point to the gems?

My apologies if this isn’t exactly the right place for the question.

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
$ gem -v

1.8.10
$ gem list

*** LOCAL GEMS ***

rake (0.9.2 ruby)
ruby-oci8 (2.0.6)
ruby-ole (1.2.11.2)
ruby-prof (0.10.8)
rubygems-update (1.8.10)
sources (0.0.1)
spreadsheet (0.6.5.9)
man-ciserv-001:~ $

JC

This is just a guess, but are you running the same Ruby version via rvm
for the gem install and the subsequent use of the gem?

When you do a gem list do you see the oci8 gem listed?

–Mark

Yes, it is the same version. I actually removed the ruby packages that
CentOS loaded as part of the developer toolset before installing the
latest with RVM.

And I have subsequently discovered that NONE of the gems I installed can
be found so I am obviously missing something fundamental.

$ gem list

*** LOCAL GEMS ***

rake (0.9.2 ruby)
ruby-oci8 (2.0.6)
ruby-ole (1.2.11.2)
ruby-prof (0.10.8)
rubygems-update (1.8.10)
sources (0.0.1)
spreadsheet (0.6.5.9)

$ ruby -rubygems
require ‘oci8’
puts ‘Hello World!’
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require': no such file to load -- oci8 (LoadError) from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from -:1:in `’
$

$ ruby -rubygems
require ‘ole’
puts ‘Hello World!’
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require': no such file to load -- ole (LoadError) from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from -:1:in `’
$

HEAVY SIGH!!!

The correct definition of GEM_HOME seems to be all that was required.
Sorry for taking up the board space.