Error Message Cannot Get Oracle Version From Sqlplus
Contents |
here for a quick overview of the site
Set The Environment Variable Oracle_home If Oracle Full Client.
Help Center Detailed answers to any questions you might have dyld_library_path is not set Meta Discuss the workings and policies of this site About Us Learn more about
An Error Occurred While Installing Ruby-oci8
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges gem install ruby oci8 mac Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot Install ruby-oci8 on Ubuntu 12.04LTS up vote 7 down vote favorite 1 sqlplus download mac I execute $ bundle install For my rails application... (3.2.8) Right when it gets to ruby-oci8 ... Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/ubuntu/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb checking for load library path... LD_LIBRARY_PATH... checking /usr/lib/oracle/12.1/client/... no checking ld.so.conf... no checking for cc... ok checking for gcc... yes checking for LP64... no checking for sys/types.h... yes checking for ruby header... ok Get the version of Oracle from SQL*Plus... *** 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=. --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) from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:709:in `initialize' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get' from extconf.rb:18:in `
Sign in Pricing Blog Support Search GitHub This repository Watch
Oracle Instant Client
14 Star 96 Fork 46 kubo/ruby-oci8 Code Issues 8 Pull requests 1 Projects 0 Wiki Pulse Graphs New issue DYLD_LIBRARY_PATH not working #85 Closed leky opened this Issue Jul 14, 2015 · 4 comments Projects None yet Labels None yet Milestone No milestone http://stackoverflow.com/questions/17712501/cannot-install-ruby-oci8-on-ubuntu-12-04lts Assignees No one assigned 2 participants leky commented Jul 14, 2015 Excuse me, there are some trouble when i install this gem in my macbook with OX EL Capitian. I has set the environment variables as follow: But it's seem that the DYLD_LIBRARY_PATH variable is not https://github.com/kubo/ruby-oci8/issues/85 working. The error message as follow: Building native extensions. This could take a while... /Users/leky/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150714-22052-1jb0893.rb extconf.rb checking for load library path... DYLD_LIBRARY_PATH is not set. checking for cc... ok checking for gcc... yes checking for LP64... yes checking for sys/types.h... yes checking for ruby header... ok Get the version of Oracle from SQL*Plus... --------------------------------------------------- Error Message: cannot get Oracle version from sqlplus Backtrace: /Users/leky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.1.8/ext/oci8/oraconf.rb:762:in get_version'
/Users/leky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.1.8/ext/oci8/oraconf.rb:711:ininitialize' /Users/leky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.1.8/ext/oci8/oraconf.rb:320:in new'
/Users/leky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.1.8/ext/oci8/oraconf.rb:320:inget' extconf.rb:18:in `' See: http://rubydoc.info/gems/ruby-oci8/file/docs/install-full-client.md for Oracle full client http://rubydoc.info/gems/ruby-oci8/file/docs/install-instant-client.md for Oracle instant client http://ruby-oci8.rubyforge.org/en/file.report-installation-issue.html to report an issue. *** 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=. --curdir --ruby=/Users/leky/.rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME) --with-instant-client --without-instant-client /Users/leky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2
Introduction We waited for it long, long time and finally it has arrived - Oracle Instant Client for Intel Mac. I was lucky to test beta http://blog.rayapps.com/2008/04/24/how-to-setup-ruby-and-new-oracle-instant-client-on-leopard/ version of the client already for the last couple of weeks and so far everything was working OK. Therefore as the final version is now available to everybody I am here rewriting my previous instructions on how to get Ruby working with Oracle on Mac. Installing Oracle Instant Client for Intel Mac At first you need to download Oracle Instant Client for Intel error message Mac. Download "Instant Client Package - Basic" and "Instant Client Package - SDK" and also I suggest "Instant Client Package - SQL*Plus" if you would like to have command line sqlplus utility. Unzip downloaded archives and move it where you would like to have it - I am keeping it in /usr/local/oracle/instantclient_10_2. Then go to this directory and make symbolic links for dynamic error message cannot libraries sudo ln -s libclntsh.dylib.10.1 libclntsh.dylib sudo ln -s libocci.dylib.10.1 libocci.dylib Then I recommend to create and place somewhere your tnsnames.ora file where you will keep your database connections definitions - I place this file in directory /usr/local/oracle/network/admin. Then finally you need to set up necessary environment variables - I place the following definitions in my .bash_profile script: export DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient_10_2" export SQLPATH="/usr/local/oracle/instantclient_10_2" export TNS_ADMIN="/usr/local/oracle/network/admin" export NLS_LANG="AMERICAN_AMERICA.UTF8" export PATH=$PATH:$DYLD_LIBRARY_PATH Use your path to Oracle Instant Client if it differc from /usr/local/oracle/instantclient_10_2. And as you see I also define NLS_LANG environment variable - this is necessary if your database is not in UTF8 encoding but in Ruby you want to get UTF-8 encoded strings from the database. Specifying this NLS_LANG environment variable you will force that Oracle Instant Client will do character set translation. After these steps relaunch Terminal application (so that new environment variables are set), specify database connection in tnsnames.ora file and try if you can access your database with sqlplus from command line. Ruby insta