Newbie Questions


I’ve created a rails application (cms/ecommerce) and want to be able to
create multiple instances of it, but keep one svn repo. The back-end
stay the same, the front-end will change based on the clients needs. The
cms/ecommerce app is a standalone Rails app. I really need to find a way
easily fix bugs, patches etc… I didn’t know about Engines and started
thinking about how to do this, so…

I created a new Rails app (as the public app), and generated a plugin. I
my cms/ecommerece app into the plugins’ application dir. (as svn
In my public apps’ environment.rb file, I initialize the cms “plugin”. I
actually got it working pretty well. I can use/override routes, views,
models, controllers and even plugins. For example, The public app will
it’s own plugin over the cms/ecommerce plugin if it’s available. Very
Reminds me of Django.

I then stumbled on Engines, and saw that your were already doing

The problem I’m trying to solve now is, how do I manage migrations? I
that Engines could possibly solve this problem? I was just going to do
manually, since it’s only a few projects at this point. The thing I like
about my code is it’s basically one file with some initialization code
it lets me use an existing Rails app as a plugin.

Some questions…

Is “Engines” still being developed?
Since I created a standalone Rails app, can Engines still help me? Or is
too late?
Would it be easy to “steal” the migration code from Engines and
implement it
into my single file initializer?

Am I thinking too hard about this? My project is of course in
subversion. I
tried thinking of a way to do this with subversion but couldn’t. 2
applications, using the same code, but customizing the front-end. Doing
diff and merge could turn into a nightmare I think.

I thought putting the cms/ecommerce back-end in it’s own web app. The
clients could log in and the app would switch databases, manage their
products etc… I could then checkout that same code into the public web
and include model/helpers code for the public side. Seems like a nice

I’d appreciate any tips or help. Thank you,

Engines is under active development (it was just updated to support
Rails 2.0). I’m also working on a commerce app (
and it uses Engines. It works nicely and will allow applications
using my commerce plugin to upgrade the plugin independent of the rest
of the app.

Take a look at the RailsCart stuff. Most of your issues have been
addressed there. There’s also a mailing list for RailsCart so if you
have specific questions I can answer them there.


ps. I would be interested in seeing your code if you have anything to
show me. You may also want to consider working on the RailsCart
project (CMS will eventually be supported through Typo or Radiant.)

Sean, where is a demo I can see?

There is no online demo but that is something that will be coming
soon. In the meantime you can build your own demo following the
instructions here[1].

Please post your feedback on the RC mailing list. I’d love to get
some input on what I have so far.