Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joegoggins/6039138 to your computer and use it in GitHub Desktop.
Save joegoggins/6039138 to your computer and use it in GitHub Desktop.
ruby-oci8 + Oracle Instant Client install for Ruby 1.9.3 Probably works fine for other versions of Ruby or instant client too. Install ruby-oci8 + Oracle instant client in < 20 minutes http://thenerdings.blogspot.com/2013/07/install-ruby-oci8-oracle-instant-in-20.html
mkdir -p /opt/oracle
cd /opt/oracle
ls -t ~/Downloads/ | head -n 3
# instantclient-basic-macos.x64-11.2.0.3.0.zip
# instantclient-sqlplus-macos.x64-11.2.0.3.0.zip
# instantclient-sdk-macos.x64-11.2.0.3.0.zip
mv ~/Downloads/instantclient-basic-macos.x64-11.2.0.3.0.zip .
mv ~/Downloads/instantclient-sqlplus-macos.x64-11.2.0.3.0.zip .
mv ~/instantclient-sdk-macos.x64-11.2.0.3.0.zip .
for item in `ls inst*`
do
unzip $item
done
#Archive: instantclient-basic-macos.x64-11.2.0.3.0.zip
# inflating: instantclient_11_2/BASIC_README
# inflating: instantclient_11_2/adrci
# inflating: instantclient_11_2/genezi
# ...
cd instantclient_11_2
export DYLD_LIBRARY_PATH=`pwd`
echo $DYLD_LIBRARY_PATH
# NOTE: You probably want to put this in your .profile so it's available next time you want to compile oracle
# /opt/oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
gem install ruby-oci8 -v '2.1.5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment