Too Cool for Internet Explorer

Monday, March 05, 2007


Hack-a-lot: Ruby on Rails, Tiger, fink and Oracle

Maybe some of you remember my article about Ruby on Rails with Mac OS X Tiger and PostgreSQL. I tried to use Oracle back then in the first place, but had some issues.
I now stumbled upon an article in the Oracle Magazine how to use the database driver Ruby/OCI8 with ruby and rails.
Of course this wasn't that easy on a Mac. *gnarf*

Because the header files did not happen to appear where they are expected I first tried it with some symlinks, without any luck. Later I came across an article at the rubyonrails wiki where they mentioned that "many readers of comp.lang.ruby advocate installing ruby from source as the install of ruby that comes with Tiger is deemed to be slightly broken".

So I updated my fink branch and installed ruby 1.8.4 and the rubygems via fink after I slightly re-ordered my $PATH to have the fink binaries on top of the list. (Edit: You have to re-order your $PATH first, because you otherwise would mix up both versions of ruby, rake and rails somehow.) I don't have to use symlinks here or remove the ruby distribution from OS X' developer tools.

When this was done I used 'gem install rails', to install rails once more - with all it's dependencies.
'which rails' should show you something like '/sw/bin/rails' after installation has been finished.

I now was able to install the necessary ruby interface for Oracle using OCI8 API with an intermediate step in the installation process: 'ruby setup.rb config'
Now the header files were found and I can keep on with 'make' and 'make install'.


Technorati Tags: , , , , , , ,

Bookmark this on Del.icio.us
posted by madhatter @ 10:31 AM


0 Comments:

Post a Comment

<< Home