Tomáš Klapka
2007-Nov-04 10:38 UTC
Multiple databases - sites sharing same schema, code and webserver(webserver cluster)
I solved multiple databases issue in my own project, kind of CMS for multiple sites each having its own db. My solution works as usual if site request.host (site URL) is ''localhost'' or if db:migrate is called If browsed to example.com which is forwarded to the rails app then it connects to prefix_example_com database (where prefix_ can be configured or be empty string) Added a new rake task db:migrate_all which would migrate all site databases defined somewhere in sql Each developer (rails application copy) can have it''s own database settings in config/dblogin.yml which shell not be under version control Code pasted at Paste: http://pastie.caboo.se/113886 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---