# Newbie Questions

**URL:** <https://www.ruby-forum.com/t/newbie-questions/126564>\
**Category:** Engines\
**Created:** [January 19, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/newbie-questions/126564 "2008-01-19T17:49:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [January 19, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/newbie-questions/126564/1 "2008-01-19T17:49:08Z")

</div>

Hi,

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  
will  
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  
to  
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  
put  
my cms/ecommerece app into the plugins’ application dir. (as svn  
externals)  
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  
use  
it’s own plugin over the cms/ecommerce plugin if it’s available. Very  
cool!  
Reminds me of Django.

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

The problem I’m trying to solve now is, how do I manage migrations? I  
see  
that Engines could possibly solve this problem? I was just going to do  
it  
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  
and  
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  
it  
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  
svn  
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  
app,  
and include model/helpers code for the public side. Seems like a nice  
clean  
solution.

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

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [January 19, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/newbie-questions/126564/2 "2008-01-19T18:55:00Z")

</div>

Engines is under active development (it was just updated to support  
Rails 2.0). I’m also working on a commerce app ([http://railscart.org](http://railscart.org))  
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.

Sean

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.)

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [January 20, 2008, 4:53pm UTC](https://www.ruby-forum.com/t/newbie-questions/126564/3 "2008-01-20T16:53:24Z")

</div>

Sean, where is a demo I can see?

---

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [January 20, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/newbie-questions/126564/4 "2008-01-20T17:08:46Z")

</div>

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.

Sean

[1] [http://code.google.com/p/railscart/](http://code.google.com/p/railscart/)
