Two separate (but related websites) one codebase

Is it possible two run two separate websites in Rails on the same
codebase? Does it make sense to do so? I currently have a website
that I want to branch into another market. The underlying structure
of the two sites will be nearly the same. Here are the major
differences:

  • Templates will be different between the two sites
  • Domains will also therefore be different
  • Navigation will be similar (but different)
  • Database could go either way but could certainly be the same

I could simply tweak the code from one site and re-deploy, but then
I’m maintaining two different codebases for essentially the same
site. Are there any good resources on how to set this up? Does
anyone in this community have direct experience of running two
different .coms on one codebase in Rails?

I’d love some guidance on how to get this setup and started.

Thanks,
-Alex

ressister wrote:

I could simply tweak the code from one site and re-deploy, but then
I’m maintaining two different codebases for essentially the same
site. Are there any good resources on how to set this up? Does
anyone in this community have direct experience of running two
different .coms on one codebase in Rails?

You could factor out the underlying functionality into a gem or a
plugin. This is how Rails was born.

Great idea Mark, thanks for the suggestion. If there are any specific
reference materials that you know of on the web that you think I
should check out for this, let me know. Thanks for you response.

-Alex

On Mar 24, 10:41 am, Mark B. [email protected]

ressister wrote:

Great idea Mark, thanks for the suggestion. If there are any specific
reference materials that you know of on the web that you think I
should check out for this, let me know. Thanks for you response.

This looks like a good place to start:

http://railscasts.com/episodes/33

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs