Installing ruby-oci8
Installing ruby-oci8 requires some manual software dependency management outside of the normal installation process. The instructions below should help you. This takes into consideration the System Integrity Protection (SIP) built into the latest versions of MacOS.
Installation
- Install Homebrew
- Download the following packages from Oracle Technology Network (registration required) or ask your sysadmin.
- instantclient-basic-macos.x64-12.2.0.1.0-2.zip
- instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
- instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
- Put the files you downloaded in ~/Library/Caches/Homebrew
- Install the Oracle InstantClient via Homebrew:
brew tap InstantClientTap/instantclient
brew install InstantClientTap/instantclient/instantclient-basic
brew install InstantClientTap/instantclient/instantclient-sdk
brew install InstantClientTap/instantclient/instantclient-sqlplus
export OCI_DIR=$(brew --prefix)/lib
gem install ruby-oci8
orbundle install
if it’s required by your project.
Upgrading
Assuming you’ve already installed the ruby-oci8
gem and the InstantClient packages
above, you’ll run into a Homebrew issue with updating.
- Update Homebrew:
brew update
- Unlink all the installed InstantClient packages:
brew list | grep instantclient | while read pkg
do
brew unlink $pkg
done
- See Step 2 in “Installation” and then come back here.
- Upgrade the InstallClient packages:
brew list | grep instantclient | while read pkg
do
brew upgrade --cleanup $pkg
done
- See Steps 5 and 6 in “Installation”. You may want to remove the
ruby-oci8
gem first.