Oracle connection problems when connecting to multiple datab

I have a rails application that connects to two different databases.
first (primary) database is MySQL and the second is Oracle. I have
the example in the Rails Recipes book and I have created a base class
the models connecting to oracle like this:

class ConferenceBase < ActiveRecord::Base
establish_connection :conference

:conference is setup in the database.yml.

A model subclass can now connect to my Oracle database – a little too
Every time I do anything with a subclass of this model it establishes a
connection. Does anyone know how to do this so a new connection to
is created everytime you access the model?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs