Create and run multiple rails apps from within a rails app


I am hoping to build a rails app that can create other rails apps and
run them. Basically the user fills in some parameters and a new rails
app is generated. Once generated, then the new application is running.

I have no problem putting together the code that generates the new
app. However, I am having trouble with figuring out how to run the new
applications. I see two main options:

  1. Reconfigure my web server to support the new app. This is not my
    preference because I would not like to change my code to support
    different hosting environments (development/production).

  2. Having my main rails app accept all the requests, then send them on
    to the new app. I really don’t know how this would work. Is it
    possible? Is it reasonable?

All of the apps will be low-traffic.


If it low traffic why not install it on subdomain on the same host?

Free Ruby & Rails screencasts

Thanks for the reply!

I am hoping to use the same host. However, I want the entire
application to be set up programmatically. I know I could just
reconfigure the webserver, but I would really like to keep my
implementation webserver agnostic (if possible).

As for subdomains, they would certainly look very nice. However, I
don’t know if this will be possible without making my implementation
webserver-specific. Please let me know if I am wrong!


Check out adv rails recipes. It shows how to use subdomains in rails

Free Ruby & Rails screencasts

Advanced Rails Recipes has been on my wish list since Christmas, but
Amazon isn’t shipping it to Canada yet :frowning:

I did check out this page

That was kind of useful, but it doesn’t really address the whole
issue. I need these to be completely separate rails apps. Each one
gets its own database, etc.


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