Oracle on Rails

written by daniel on December 14th, 2006 @ 05:37 PM

Today I had the pleasure experience of setting up Rails to work with an Oracle Database.

There are good tutorials out there to help. The best that I found was this one by carsonm at Mission Data.

A few notes of my own:

  • I had no luck, until I removed the trailing / in ORACLE_HOME, then everything Just Worked.
  • Read the directions carefully. There are some important bits that are easy to miss.
  • Don’t try to install on an Intel Mac. Its not worth your effort (as of this writing). I thought I’d be smart and get Oracle working on my MacBook Pro before trying on the server. There are a couple places where you have to deviate from the instructions for a Mac (nothing difficult), but in the end you get punished for having an Intel Mac.
    • If you to try to install on a Mac, follow the instructions above, and change the symlink in Step 2 to ln -s libclntsh.dylib.10.1 libclntsh.dylib
    • In Step 3, change LD_LIBRARY_PATH to DYLD_LIBRARY_PATH.
    • There may be others. This is where I got punished and gave up.
  • In newer versions of Rails you must set the adapter to “oracle” instead of “oci” in your database.yml

It’s clear to me now how Oracle keeps consultants employed…

Comments

  • J. Mihai on 13 Dec 08:34

    Thanks for the information, its really useful for me since I am gathering a resources in this domain. Lookin forward tot reading more of your posts.

  • JOC on 07 Jan 16:33

    Like J.Mihai was saying …many thanks Daniel for this resource. Very useful.

Post a comment

Options:

Size

Colors