3

I have a "core" project developed in RoR. The problem is that there are several independent projects which have this "core" as they based code, and then they may have new functionalities or changes in views, helpers, controllers, etc. I want that any change in the "core" can be tracked by these other projects. Hence, any change in the "core" will be replicated, or not, on the other projects. I was thinking in gemify the "core" project, but due to the constant changes that the other projects have, this wouldn't be the best solution (is a long process too). That's what I think. Other solution would be to separate some important code into modules. Then I can import this new features in the projects which want to use them.

The "core" project is a pure MVC ruby on rails project.

What do you suggest for this issue?

Thanks in advance.

Dagosi
  • 948
  • 2
  • 11
  • 25
  • 4
    A good answer would require knowing more of what the 'core' is made up of. Can you give more specifics on the type of code that is being shared? – PinnyM Jan 03 '13 at 15:43
  • The "core" project is a pure MVC ruby on rails project. – Dagosi Jan 03 '13 at 15:46
  • Then you're done - Rails is your core project. Or am I missing something? – PinnyM Jan 03 '13 at 15:47
  • 1
    For example, I have a Blog project, right?, and there is a client who wants a blog for herself, but with some changes. So, how can I encapsulate this blog project as a "core" in order to use it in the client's project, and that any change in the core can be imported easily in the new project?. – Dagosi Jan 03 '13 at 16:05
  • 1
    It appears that you want a custom Rails project without complex dependencies as your core. If that's the case, go with @Mori's answer - an Engine encapsulates that very well. – PinnyM Jan 03 '13 at 16:21

1 Answers1

6

We have about a hundred Rails sites, each customized from a core engine gem included in all of them. Groups of related sites also use a secondary engine gem. See Rails Engines.

Mori
  • 27,279
  • 10
  • 68
  • 73
  • This looks awesome @Mori. Thanks for your recommendation. I have another question. Do you know an easy way to migrate a normal RoR project to an engine solution? – Dagosi Jan 03 '13 at 17:25
  • @Dagosi, see [this question](http://stackoverflow.com/questions/6470430/how-do-i-convert-an-existing-rails-3-application-into-an-engine). – Mori Jan 03 '13 at 17:32