2007-12-27 15:21:09 +0000

The Mephisto Docs tell you to put the Site.multi_sites_enabled = true into the environments files, but this is no longer true…

In fact, in the production.rb file you will find a commented out Site.multi_sites_enabled = true line. But beware Skywalker, this road leads to the dark side of tearing your hair out trying to trace an ActiveRecord::ConnectionNotEstablished error.

Now, you have to tell Mephisto that you want it to run in Multisite mode, but the environment is not the place. Where to put it? In your initializers/custom.rb file! This file loads after your environments load, so jump into your favorite text editor and edit the config/initializers/custom.rb file and uncomment the line:

Site.multi_sites_enabled = true

Delete the one that is in the production.rb file.

Save the files and jump back to the command line.

Now to get the multi sites setup, from the Mephisto dir, do the following (replace the dev.domain?.org with your domain names as well as the titles with something that means something to you!)

Note one thing here, you need to use “drugfacts.org.au” for www.drugfacts.org.au. Mephisto will drop any leading www. It won’t drop anything else that is leading, like “dev” or something similar, this is important to remember for when we are deploying into a production environment. However, for us right now, everything is prefixed with “dev” so we use the full name.

lindsaar.net is proudly bought to you by the letters l, i, n, d, s, a, r, e and t.
The comments on this site belong to Mikel Lindsaar and do not reflect the viewpoint of my employer, parents or anyone else.
Powered by Sinatra