Multi site with RoR

HI All,

I have just installed rails. Also I have installed spree,spree-multi-
domains gems.

I could run the sample spree app but on the admin of spree could not
find facility to add multi domains, I have googled but could not find
how to create multi domains using rails or spree. If there are any
ruby gems to achieve or any other way please let me know. Below is
what I wanted exactly

  1. A parent domain ( with user who adminsters the
    entire system.He should be able to add different sub sites/domains
    ( ex:,,

  2. All the sub site/domain needs to have a site administrator who can
    only configure/modfiy his site details.(not the others)

  3. The content of each subsite is stored in same single database
    against the site name.

Please let me know how to achieve In a way stuck

NewROR User

On Fri, Oct 21, 2011 at 11:21 AM, OnRail [email protected] wrote:

You definitely can. Check out section 3.9 of this:

Of course you are up for some work :wink: Also, not sure if it would help in
your case, but using the rails mountable engines to modularize might
and that also should work into your routing schema (i.e. see the
on mountable engines).

Thanks dhanaka.

will take a look,try.


On Fri, Oct 21, 2011 at 9:52 PM, Danaka K.

Hi all,

Taken a look,But i did not understand on the following

how to create three domains itself in the first place using RoR, ie
parent domain ( and subdomains (,,
on typing the in the browser address bar i should go to
admin domain. how to tell this in routes.rb
on typing the subdomain (Ex on browsers address
how I should tell routes to go to subdomain’s front page which is
different from the parent domain’s page.
how to define /where in routes define whats the defulat pages for each

can you suggest me some good documentation or can u share if something
already exists.