Archive for July, 2007

Installing Oracle Instant Client on Mac OS X

Thursday, July 26th, 2007

Installing Oracle Instant Client on Mac OS X



Getting right down to business...

  1. Download the Instant Client Packages (4 files)
  2. Unzip the files into instantclient10_1
    unzip instantclient-basic-macosx-10.1.0.3.zip
    unzip instantclient-sqlplus-macosx-10.1.0.3.zip
    unzip instantclient-sdk-macosx-10.1.0.3.zip
    unzip instantclient-jdbc-macosx-10.1.0.3.zip

  3. Create two symbolic links for the files that have the version appended. This is so the Ruby OCI8 driver can find what it’s looking for.
    cd instantclient10_1
    ln -s libclntsh.dylib.10.1 libclntsh.dylib
    ln -s libocci.dylib.10.1 libocci.dylib
    cd ..

  4. Create directory /usr/local/oracle and then copy instantclient10_1 into it
    sudo mkdir /usr/local/oracle
    sudo mv instantclient10_1 /usr/local/oracle/instantclient10_1

  5. Open the system /etc/profile
    sudo pico /etc/profile
  6. Add these lines to /etc/profile
    DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient10_1"
    export DYLD_LIBRARY_PATH
    SQLPATH="/usr/local/oracle/instantclient10_1"
    export SQLPATH

    Add /usr/local/oracle/instantclient10_1 to your PATH while you have /etc/profile open. Then save it.

  7. Reload your profile

    source /etc/profile
  8. Test it out with the sqlplus command line app.
    sqlplus [username][/password]@//[hostname][:port][/database]

If you can connect with that, then you’re good to go.

JRuby: Calling Ruby’s ActiveRecord from Java Using the Bean Scripting Framework

Wednesday, July 25th, 2007

JRuby: Calling Ruby’s ActiveRecord from Java Using the Bean Scripting FrameworkHere we need to use the Bean Scripting Framework (BSF) since Java 5 doesn't have the built-in scripting support that Java 6 has. I will also use 2 helper classes (JRubyHelper.java and BSFHelper.java) provided by ociweb.com. For brevity I will leave out the source of the helper classes and concentrate on the actual code to make a call to a Ruby script from Java: (more...)


Fox Holes

  • You are currently browsing the Digital Sanctum weblog archives for July, 2007.

Rabbit Holes

Chasms