Cannot Install ruby-oci8 on Ubuntu 12.04LTS -
i execute
$ bundle install
for rails application... (3.2.8)
right when gets ruby-oci8 ...
gem::installer::extensionbuilderror: error: failed build gem native extension. /home/ubuntu/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb checking load library path... ld_library_path... checking /usr/lib/oracle/12.1/client/... no checking ld.so.conf... no checking cc... ok checking gcc... yes checking lp64... no checking sys/types.h... yes checking ruby header... ok version of oracle sql*plus... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. 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=. --curdir --ruby=/home/ubuntu/.rvm/rubies/ruby-1.9.3-p448/bin/ruby --with-instant-client --without-instant-client /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:760:in `get_version': runtimeerror (runtimeerror) /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:709:in `initialize' /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new' /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get' extconf.rb:18:in `<main>' --------------------------------------------------- error message: cannot oracle version sqlplus backtrace: /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:760:in `get_version' /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:709:in `initialize' /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new' /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get' extconf.rb:18:in `<main>' --------------------------------------------------- see: * http://ruby-oci8.rubyforge.org/en/howtoinstall.html * http://ruby-oci8.rubyforge.org/en/reportinstallproblem.html gem files remain installed in /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5 inspection. results logged /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/gem_make.out error occurred while installing ruby-oci8 (2.1.5), , bundler cannot continue. make sure `gem install ruby-oci8 -v '2.1.5'` succeeds before bundling.
i did every site , forum (especially here). 1 feel closest... http://jigyasamakkar.com/ruby-oci8-with-rails-3-1-on-ubuntu/
what best way solve issue?
i had install oracle + ruby gem, here instructions mac (but work ubuntu). full instructions at:
http://blog.codiez.co.za/2013/09/setup-oracle-instant-client-ruby-oci8-gem-mac/
the key ruby-oci gem needs know dynamic libraries stored. ubuntu need set: ld_library_path
grab following files:
- instantclient-basic-linux.x64-11.2.0.3.0.zip
- instantclient-sqlplus-linux.x64-11.2.0.3.0.zip
- instantclient-sdk-linux.x64-11.2.0.3.0.zip
extract them , put them somewhere, , add following environment variables. see link detailed instructions.
export oracle_base=/usr/local/oracle export oracle_home=$oracle_base/product/instantclient_64/11.2.0.3.0 export path=$oracle_home/bin:$path export ld_library_path=$oracle_home/lib:$dyld_library_path export tns_admin=$oracle_base/admin/network
explanation of environment variables:
oracle_base: files stored oracle_home: path actual client ld_library_path: should point the lib directory, make sure have sdk zip file extracted here tns_admin: find tns_admin file (not necessary ruby-oci gem)
Comments
Post a Comment