Topic: Rails apps and domains

Are Rails apps supposed to be run at the root of a site?

www.mysite.com -- serving up the app

Or are you able to run multiple apps from a single domain?

www.mysite.com/app1/
www.mysite.com/app2/
www.mysite.com/app3/

Re: Rails apps and domains

Both. You can set a rails app up in the web root and/or in sub-directories. You'd just keep the rails stuff out of web root and create symbolic links to the /public folder for each app wherever you want them.

Re: Rails apps and domains

If running several apps, can you overcome the ugly names that occur? I have a blog controller (blog), running in an application with a sym link (also blog) so it looks like:

www.mysite.com/blog/blog

Do I have to edit routes.rb to get it to (by default) ignore my controller?

Re: Rails apps and domains

Does your host support subdomains? I find that to be a much more elegant solution:

app1.mysite.com
app2.mysite.com

etc.

Otherwise, yes, you can edit routes.rb to get the URL to appear the way you want, although I don't know if that is the best way to go about it.

Also, this may help:
http://wiki.rubyonrails.com/rails/pages … ourWebsite

Railscasts - Free Ruby on Rails Screencasts