(RoR) How to: link multiple apps, multiple URLs, one database
Posted
by
Samson
on Stack Overflow
See other posts from Stack Overflow
or by Samson
Published on 2011-01-12T18:50:37Z
Indexed on
2011/01/12
18:53 UTC
Read the original article
Hit count: 226
Hello. I am currently developing a site using Ruby on Rails. I am still a beginner who just started around a month ago. I use InstantRails on Windows 7. Here's my question. Let's say app A is functional using MYSQL database A_development. The files such as views and controller are under folder 'A'. I now know how to, say for example, link www.app.com to this app by opening port 80 and changing some lines in the mySQL config.
In this app, you can register your username, login, and post some messages.
I now want to create some pretty identical apps say B and C. The only thing different will be the posts that shows, and the views. You can still log in with the same username, and everything is saved in the same database. I now want the URLs to look something like A.app.com leading to app A, B.app.com leading to app B, etc. Can that be achieved? How?
I've been googling for a few days already and I'm still lost. As I'm new to this forum, I'm not quite sure what info do you guys need. Please list and I'll provide them asap. Any help will be appreciated! Thanks.
© Stack Overflow or respective owner