require 'active_record'Very straightforward, no reason why it shouldn't work, but it didn't: Oracle kept complaining that I was supplying the MESSAGE_ID column twice. No amount of tweaking, googling and tearing out my hair got me anywhere, and I lost nearly a whole day because of this. Finally, out of sheer desperation, I changed "MESSAGE_ID" to lower case.
class Message < ActiveRecord::Base
establish_connection(:adapter => "oci",
:username => "someuser",
:password => "somepasswd",
:host => "somehost")
msg = Message.new(:name => "Test message")
(I'm not even going to ask why upper case table names are OK, while upper case column names are not)