开发者

Configuring multiple applications in RoR

I would like to have multiple RoR applications that can communicate with each other (databases, method calls, ...).

Example of what I would like:

  • a main application running on a URL http:// www.< application_name >.com
  • a sub-application 1 running on a URL http:// www.< application1_name >.< application_name >.com
  • a sub-application 2 running on a URL http:// www.< application2_name >.< application_name >.com

each with own databases.

How can I configure my applications?开发者_开发知识库 Where can I find a tutorial for my needs?


No Problem. In your case you will have 3 distinct Rails applications. You will setup your Webserver to send requests based on host accessed to one of the three applications. This is standard web server configuration. You'll need to read Apache or Nginx configuration on how to route request to the right rails application.

EDIT:

http://articles.slicehost.com/2009/3/11/ubuntu-intrepid-nginx-rails-and-mongrels Not sure what you are going to use as your Web Server (Apache or Nginx or something else) or what you are going use as your application container (mongrel/passenger/thin etc) but this article above should help.


You might take a look at the eco_apps gem - https://github.com/idapted/eco_apps. I heard the developers give a talk about it at Rails Conf '10. Fascinating stuff, though I haven't had a chance to use it yet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜