rickypai
rickypai

Reputation: 4016

Import a Rails project to another or merging the two

I want to move files from Project B to Project A.

There are answers on stackoverflow about Modules, but that also looks like a lot of work to refactor the Project B as a module.

Another way is the manually move the files from Project B to Project A, but there would be sync issues when the files from Project B are updated. Is there an easier solution?

The reason I am doing this is Project B is a checkout system that can be used for various projects.

Upvotes: 0

Views: 411

Answers (2)

Chris
Chris

Reputation: 12191

When you say files do you just mean code?

You can create a gem from Project B (and treat it as an external service, if it is set up to act as such), or you actually mount Project B onto Project A. There is a RailsCast on Mountable Engines, or you can check out the official documentation on Engines.

Upvotes: 0

DGM
DGM

Reputation: 26979

It sounds like project B really needs to be gemified into a rails engine.

Upvotes: 1

Related Questions