How to install ruby-oci8?
For anyone attempting to get this to work in the good old year of 2016, the error message now contains a link to the page http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md that gives you instructions for how to do it using Homebrew. None of the above stuff worked for me (and I tried it all), but then I took this problem to a coworker and they said, "Hey, did you try that link in the error message there?" Sure enough, that did it.
Slightly updated version of install of ruby-oci8 for 10.9/10.10/10.11OSX Mavericks/Yosemite/El Capitan - step-by-step:
- Go here: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
- Download the 64bit versions of instantclient-sqlplus, instantclient-sdk, instantclient-basic - the 32bit versions do not work with OSX 10.9
- Create directories at /opt/oracle
- Unzip instantclient-basic first, move to /opt/oracle (should add a folder - something like /opt/oracle/instantclient_11_2/)
- Unzip instantclient-sdk and move its contents to /opt/oracle/instantclient_11_2/
- Unzip instantclient-sqlplus and move its contents /opt/oracle/instantclient_11_2/
- Open Terminal (if you haven't already) and type...
DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2 export DYLD_LIBRARY_PATH
ORACLE_HOME=/opt/oracle/instantclient_11_2 export ORACLE_HOME
cd /opt/oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
(creates a symbolic link)env
- verify that DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2 (be sure there's no trailing / after instantclient_11_2)
- verify ORACLE_HOME=/opt/oracle/instantclient_11_2
- gem install ruby-oci8
Should work after that. The file structure should look similar to this: