Note that there are some explanatory texts on larger screens.

plurals
  1. POCombining 2 rails apps to a single codebase
    text
    copied!<p>Our company started out with a single product, a rails app backed by some java services, then decided they wanted another product that was initially considerably different than the first, but as time has gone on we've realized they are starting to converge, and making a code change to one requires a similar code change to the other for a new feature/bug fix. This is obviously becoming a pain. </p> <p>In some cases we have gems that share some of this functionality but it goes beyond ruby into javascript, css etc..</p> <p>So I'm tasked with merging these two apps into one codebase. I think eventually we'd like it to be a single app with permission based role access but that will come much later.</p> <p>My first thought to quickly put them together is to create two rails engines and share common libs between them. I think this is the quickest way to combine the code, find common sections and start sharing.</p> <p>My first problem though is how to route between the apps. One app uses a single domain name that never changes, the other app has many domains. Can someone suggest how I might route a particular request to a particular app so they can remain separate to start whilst sharing a common codebase of libs?</p> <p>Or, if anyone has other suggestions as to a way to combine these apps I'm all ears.</p> <p>They're both Rails 2.3.10 apps running JRUBY 1.5.3, but we're open to possibly upgrading to Rails3 if that would make things significantly easier or cleaner (ie with better Rack integration) </p> <p>I haven't done any Rack programming but never hurts to learn if that will make our lives easier.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload