# Installing ruby-oci8 on Mac OS X for Rails

**URL:** <https://www.ruby-forum.com/t/installing-ruby-oci8-on-mac-os-x-for-rails/67289>\
**Category:** Ruby\
**Created:** [February 13, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/installing-ruby-oci8-on-mac-os-x-for-rails/67289 "2006-02-13T19:28:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 13, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/installing-ruby-oci8-on-mac-os-x-for-rails/67289/1 "2006-02-13T19:28:35Z")

</div>

I am trying to get Rails to work with an Oracle database running  
remotely. Rails will run on Mac OS X. I’m trying to follow the  
directions at  
[Koalan & Surikaten](http://creativi.st/blog/articles/2005/06/25/rails-oracle-client-on-mac-os-x),  
but I get stuck at step 8 (test connection to database). When I try go  
on and install the ruby-oci8 bindings, I get this output when trying to  
config:

—\> lib  
—\> lib/DBD  
—\> lib/DBD/OCI8  
\<— lib/DBD/OCI8  
\<— lib/DBD  
\<— lib  
—\> ext  
—\> ext/oci8  
/usr/bin/ruby /Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/extconf.rb  
–with-instant-client=/usr/local/oracle/instantclient10\_1/  
checking for gcc… yes  
checking for LP64… no  
checking for OCIInitialize()… no  
--------------- common error message --------------  
If you use Oracle instant client, try with --with-instant-client.

zip package:  
ruby setup.rb config –  
–with-instant-client=/path/to/instantclient10\_1

rpm package:  
ruby setup.rb config – --with-instant-client

The latest version of oraconf.rb may solve the problem.

[http://rubyforge.org/cgi-bin/viewcvs.cgi/ruby-oci8/ext/oci8/oraconf.rb?cvsroot=ruby-oci8&only\_with\_tag=MAIN](http://rubyforge.org/cgi-bin/viewcvs.cgi/ruby-oci8/ext/oci8/oraconf.rb?cvsroot=ruby-oci8&only_with_tag=MAIN)

If it could not be solved, send the following information to  
removed\_email\_address@domain.invalid.

- error messages except ‘common error message’.
- last 100 lines of ‘ext/oci8/mkmf.log’.
- results of the following commands:  
ruby -r rbconfig -e “p Config::CONFIG[‘host’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘CC’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘CFLAGS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LDSHARED’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LDFLAGS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LIBS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘GNU\_LD’]”
- if you use gcc:  
gcc --print-prog-name=ld  
gcc --print-prog-name=as
- on platforms which can use both 32bit/64bit binaries:  
file $ORACLE\_HOME/bin/oracle  
file `which ruby`  
echo $LD\_LIBRARY\_PATH  
echo $LIBPATH # AIX  
echo $SHLIB\_PATH # HP-UX  
------------------ error message ------------------  
Could not compile with Oracle instant client.  
You may need to set:  
DYLD\_LIBRARY\_PATH=/usr/local/oracle/instantclient10\_1/

* * *

/Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/oraconf.rb:575:in  
`check_instant_client': RuntimeError (RuntimeError) from /Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/oraconf.rb:107:in `initialize’  
from  
/Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/extconf.rb:6:in `new’  
from  
/Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/extconf.rb:6  
‘system /usr/bin/ruby  
/Users/brian/Desktop/ruby-oci8-0.1.13/ext/oci8/extconf.rb  
–with-instant-client=/usr/local/oracle/instantclient10\_1/’ failed  
Try ‘ruby setup.rb --help’ for detailed usage.

I tried following the hints it gave there, including updating  
oraconf.rb, setting DYLD\_LIBRARY\_PATH. Any ideas?

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 14, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/installing-ruby-oci8-on-mac-os-x-for-rails/67289/2 "2006-02-14T15:13:14Z")

</div>

Hi,

removed\_email\_address@domain.invalid writes:

> I am trying to get Rails to work with an Oracle database running  
> remotely. Rails will run on Mac OS X. I’m trying to follow the  
> directions at  
> [Koalan & Surikaten](http://creativi.st/blog/articles/2005/06/25/rails-oracle-client-on-mac-os-x),  
> but I get stuck at step 8 (test connection to database). When I try go  
> on and install the ruby-oci8 bindings, I get this output when trying to  
> config:  
> (snip)

Please post the last 100 lines of ext/oci8/mkmf.log and the results of  
the following commands.

ruby -r rbconfig -e “p Config::CONFIG[‘host’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘CC’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘CFLAGS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LDSHARED’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LDFLAGS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘LIBS’]”  
ruby -r rbconfig -e “p Config::CONFIG[‘GNU\_LD’]”
