Rekha
Rekha

Reputation: 31

Error Message: cannot get Oracle version from sqlplus

Ruby-oci8 gem is failing with the following error message while built on ubuntu linux, even though I have my LD_LIBRARY_PATH and ORACLE_HOME set to the right path.

*Get the version of Oracle from SQLPlus... /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options:
 --with-opt-dir
 --without-opt-dir
 --with-opt-include
 --without-opt-include=${opt-dir}/include
 --with-opt-lib
 --without-opt-lib=${opt-dir}/lib
 --with-make-prog
 --without-make-prog
 --srcdir=/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8
 --curdir
 --ruby=/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby2.1/export/bin/ruby
 --with-instant-client
 --without-instant-client
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:834:in `get_version': RuntimeError (RuntimeError)
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:783:in `initialize'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `new'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `get'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb:22:in `<main>'

Error Message:

cannot get Oracle version from sqlplus Backtrace:
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:834:in get_version'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:783:in
initialize'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in new'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in
get'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb:22:in `'*

Any idea what's missing here?

Upvotes: 0

Views: 1599

Answers (1)

nahurmf
nahurmf

Reputation: 51

In my case, I just had to create a "bin" sub-directory under ORACLE_HOME, and then create a link to the sqlplus binary there.

Upvotes: 2

Related Questions