I\'m trying to install ruby-oci8 on OS X.
I\'ve tried installing both with and without sudo
.
Error Message without sudo
:
In case anyone else needs to install a legacy version of ruby-oci8 on Ruby 1.8.7 on mac osx el capitan, I had success installing ruby-oci8-2.1.2 using the following method. I think it will also work on other ruby-1.8.7 versions as well (ruby-oci8 < 2.2.0) but I haven't checked other versions:
cd /opt/oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
curl -O https://raw.githubusercontent.com/kubo/fix_oralib_osx/master/fix_oralib.rb
ruby fix_oralib.rb -a
export OCI_DIR=/opt/oracle/instantclient_11_2
git clone https://github.com/kubo/ruby-oci8.git
git checkout ruby-oci8-2.1.2
when /darwin/
@@ld_envs = %w[DYLD_LIBRARY_PATH]
so_ext = 'dylib'
To this:
when /darwin/
@@ld_envs = %w[DYLD_LIBRARY_PATH OCI_DIR]
so_ext = 'dylib'
gem build ruby-oci8.gemspec
2potatocakes$ gem install ruby-oci8-2.1.2.gem
Building native extensions. This could take a while...
Successfully installed ruby-oci8-2.1.2
1 gem installed