Rails: bundler can’t install gem ruby-oci8

The Solution

brew tap InstantClientTap/instantclient
brew install instantclient-basic
brew install instantclient-sqlplus
brew install instantclient-sdk

Sourced from: https://stackoverflow.com/a/65320336

The Error

➜ bundle install

Error Message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.
"oci.h" could not be found in: /usr/local/lib/sdk/include
An error occurred while installing ruby-oci8 (2.2.12), and Bundler cannot continue.

Leave a comment