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.
Is “Engines” still being developed?
Since I created a standalone Rails app, can Engines still help me? Or is
Would it be easy to “steal” the migration code from Engines and
into my single file initializer?
Am I thinking too hard about this? My project is of course in
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,