Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

This branch is 1 commit ahead of tenderlove:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
doc
ext/oci8
lib
spec
test
ChangeLog
Makefile
NEWS
README
VERSION
custom-rdoc.rb
dist-files
metaconfig
pre-distclean.rb
ruby-oci8.gemspec
setup.rb

README

= How to make

* <tt>ruby</tt> and <tt>make</tt> (or nmake on MSVC) commands in the environment variable <tt>PATH</tt>?
* <tt>ruby</tt> is 1.8.0 or later? (Use ruby-oci8 0.1.x for ruby 1.6.x.)

== For OCI installed by Oracle Universal Installer
make sure the environment variable ORACLE_HOME (or registry on Windows)
is set correctly. run the the following commands.

  make (or nmake on MSVC)

== For OCI installed by Oracle Instant Installer

linux:
  ruby setup.rb config -- --with-instant-client
  make

others:
  ruby setup.rb config -- --with-instant-client=/path/to/instantclient10_1
  make (or nmake on MSVC)

= On compilation failure

Please report the following information to kubo@jiubao.org.

* last 100 lines of 'ext/oci8/mkmf.log'.
* 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']"
* 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

= How to run unit test

before runing unit test, 
1. connect to Oracle as system:

    $ sqlplus system/<password_of_system>

2. create user ruby:

    SQL> CREATE USER ruby IDENTIFIED BY oci8;

   or

    SQL> CREATE USER ruby IDENTIFIED BY oci8
       2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;

3. grant the privilege to connect and execute.

    SQL> GRANT connect, resource, create view TO ruby;

4. connect to Oracle as sys

    $ sqlplus 'sys/<password_of_sys> as sysdba'

5. grant the privilege for the unittest of blocking-mode.

    SQL> GRANT EXECUTE ON dbms_lock TO ruby;

6. change test/config.rb as you like

Then you can run:
  $ make check
or
  $ nmake check   (If your compiler is MS Visual C++.)
Something went wrong with that request. Please try again.