I'm trying to install ruby-oci8 (mac) using ruby-oci8 and unable to install.
When i try to install this gem.
gem install ruby-oci8
Its generate error for environment variable. I am unable to figure out this problem.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/tayyab/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20160423-11068-8lu6zg.rb extconf.rb
checking for load library path...
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/tayyab/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME)
--with-instant-client
--without-instant-client
/Users/tayyab/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:566:in `check_ic_dir': RuntimeError (RuntimeError)
from /Users/tayyab/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:316:in `get'
from extconf.rb:22:in `<main>'
DYLD_LIBRARY_PATH is not set.
checking DYLD_FALLBACK_LIBRARY_PATH...
checking /Users/tayyab/lib... no
checking /usr/local/lib... no
checking /lib... no
checking /usr/lib... no
checking OCI_DIR...
---------------------------------------------------
Error Message:
Set the environment variable DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH or
OCI_DIR to point to the Instant client directory.
If DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH is set, the environment
variable must be set at runtime also.
If OCI_DIR is set, dependent shared library paths are checked. If the checking
is passed, ruby-oci8 works without DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH.
Note: OCI_DIR should be absolute path.
Note: DYLD_* environment variables are unavailable for security reasons on OS X 10.11 El Capitan.
Any idea how to resolved it?