Thxs.
On Aug 23, 9:04 pm, David Angga <[email protected]> wrote:
> we can use multiple database in one rails app.
> here's the example :
> database.yml
> development:
>
> adapter: mysql
> username: root
> password:
> database: example_development
>
> oracle_development:
> adapter: oracle
> username: root
>
> password:
> database: example_oracle_developmen
> in the model :
> class User < ActiveRecord::Base
>
> establish_connection :oracle_development
> end
>
> class Address < ActiveRecord::Base
>
> establish_connection :development
> end
> So, based on this code you can have more than 3 database in 1 rails app.
>
> That's my none scientific explanation.
> thanks.
>
>
>
> On Mon, Aug 24, 2009 at 8:29 AM, GuruOne <[email protected]> wrote:
>
> > Hi Everyone,
>
> > I have a couple of questions
> > 1. A typical rails environment has 3 databases - development, test,
> > production.
> > - Can I have more?
> > - Is there a limit?
>
> > 2. In most rails applications you usually have one database type i.e.
> > MySQL or sqlite3 or PostgreSQL or ...
> > - Can I use MySQL and sqlite3 from the same rails application?
> > - Is there a limit?
>
> > Regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---