Download and install: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
- oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm
- oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm
Set your LD_LIBRARY_PATH so compile can find Oracle libs. Double check the path here actually reflects the version of packages you downloaded: export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client/lib
Install ruby-oci8 gem: gem install ruby-oci8 (or via bundler)
With luck ruby-oc8 will build.
Tell SELinux that these libs can have an executable stack: (see: http://fedoraforum.org/forum/showthread.php?t=259605)
- sudo /usr/bin/execstack -c /usr/lib/oracle/10.2.0.4/client64/lib/libclntsh.so.10.1
- sudo /usr/bin/execstack -c /usr/lib/oracle/10.2.0.4/client64/lib/libnnz10.so
Test it:
require ‘dbi’
require ‘oci8’
dbh = DBI.connect(“DBI:OCI8:whatever”, username, password)
dbh.execute(‘select * from whatever’)