On Mac OSX Lion: “ERROR: Error installing ruby-oci8: ERROR: Failed to build gem native extension”Posted: April 11, 2013 | Author: tech0x20 | Filed under: ruby | Tags: 64bit, error, lion, oracle, osx, ruby | Leave a comment »
Running Mac OSX Lion, trying to bundle install a project that included the ruby-oci8 gem, I received the following error:
Building native extensions. This could take a while... ERROR: Error installing ruby-oci8: ERROR: Failed to build gem native extension.
Fortunately, the 64-bit client for Oracle has now been updated for Lion/Mountain Lion. Download them from Instant Client Downloads for Mac OSX (Intel x86). Downloading “Basic Lite” and the “SDK” under Version 11.2… (64-bit) worked for me.
Unzip the files to
~/instantclient_11_2 so that the sdk directory and libs are directory beneath it:
$ ls ~/instantclient_11_2 BASIC_LITE_README genezi libclntsh.dylib.11.1 libocci.dylib.11.1 libocijdbc11.dylib ojdbc6.jar uidrvci adrci libclntsh.dylib libnnz11.dylib libociicus.dylib ojdbc5.jar sdk xstreams.jar
Add the following to my
.zlogin or .bash_login
Rerun the login shell (
exec $SHELL -l) or restart your shell.
Link the libclntsh.dylib.
ln -s libclntsh.dylib.11.1 libclntsh.dylib
Your ruby-oci8 should install now.