Skip to content

Instantly share code, notes, and snippets.

@gentilfp
Last active August 29, 2015 14:13
Show Gist options
  • Save gentilfp/400fe2fce94cf2895176 to your computer and use it in GitHub Desktop.
Save gentilfp/400fe2fce94cf2895176 to your computer and use it in GitHub Desktop.
Install ruby-oci8
Step 1
Go to oracle web site for some downloads http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html.
Step 2
Download: instantclient-sqlplus, instantclient-sdk, instantclient-basic
Step 3
Create directories at /opt/oracle incase its not yet created with following command:
$ mkdir /opt/oracle
Step 4
Unzip instantclient-basic, move to /opt/oracle the unzipped folder will be something like instantclient_11_2.
Note : we will be moving other two unzipped folders in this folder, wont keep them separately.
Step 5
Next unzip instantclient-sqlplus move its filed & folders to /opt/oracle/instantclient_11_2/
Step 6
Next unzip instantclient-sdk move its contents /opt/oracle/instantclient_11_2/
Step 7
Next, via terminal we will add some env variable. First, DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2 export DYLD_LIBRARY_PATH
Secondly, ORACLE_HOME=/opt/oracle/instantclient_11_2 export ORACLE_HOME
Check if env variables are created properly by executing $ env
Step 8
You may need to make a symbolic link.
cd /opt/oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
Step 9
Now run gem install ruby-oci8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment