# Creating a rails app within a rails app

**URL:** <https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473>\
**Category:** Ruby\
**Created:** [February 5, 2007, 2:00am UTC](https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473 "2007-02-05T02:00:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![libsfan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/779978/32.png) [@libsfan01](https://www.ruby-forum.com/u/libsfan01)\
**Post date:** [February 5, 2007, 2:00am UTC](https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473/1 "2007-02-05T02:00:35Z")

</div>

hi all

due to hosting constraints, i need to deploy a rails site within an  
existing rails site.

where do i need to “cd” to, to issue the rails command to generate the  
site? i’ve tried the public folder but that doesn’t appear to be  
working.

thanks

marc

---

<div class="post-metadata">

**Author:** ![libsfan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/779978/32.png) [@libsfan01](https://www.ruby-forum.com/u/libsfan01)\
**Post date:** [February 5, 2007, 2:11am UTC](https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473/2 "2007-02-05T02:11:39Z")

</div>

On 2/4/07, libsfan01 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> thanks
> 
> marc

Might check the rails list.  
[http://www.ruby-forum.com/topic/3552](http://www.ruby-forum.com/topic/3552)  
mirror: [http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)  
or possibly here: [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)  
and if there’s anything I’ve left out, you can search for it here:  
[http://rubykitchensink.ca/](http://rubykitchensink.ca/)

---

<div class="post-metadata">

**Author:** ![libsfan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/779978/32.png) [@libsfan01](https://www.ruby-forum.com/u/libsfan01)\
**Post date:** [February 5, 2007, 7:05am UTC](https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473/3 "2007-02-05T07:05:50Z")

</div>

On Feb 4, 5:56 pm, “libsfan01” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> due to hosting constraints, i need to deploy a rails site within an  
> existing rails site.
> 
> where do i need to “cd” to, to issue the rails command to generate the  
> site? i’ve tried the public folder but that doesn’t appear to be  
> working.

Hello. The ruby-talk mailing list (which also appears as the  
comp.lang.ruby newsgroup) is for discussion of the Ruby language in  
general. For questions about Ruby on Rails (a web framework that  
happens to use the Ruby language), you’ll probably want to ask on the  
Rails group:

[http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk)

---

<div class="post-metadata">

**Author:** ![libsfan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/779978/32.png) [@libsfan01](https://www.ruby-forum.com/u/libsfan01)\
**Post date:** [February 5, 2007, 8:53am UTC](https://www.ruby-forum.com/t/creating-a-rails-app-within-a-rails-app/84473/4 "2007-02-05T08:53:56Z")

</div>

On 2/5/07, libsfan01 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> hi all
> 
> due to hosting constraints, i need to deploy a rails site within an  
> existing rails site.
> 
> where do i need to “cd” to, to issue the rails command to generate the  
> site? i’ve tried the public folder but that doesn’t appear to be  
> working.

Hi,

I suppose you don’t generate it within some folder of the main site.  
These are possibilities that I can think of (note that I’m not a  
railsist 😉 so there might be other options):

1. generate theme side by side, and link them via .htaccess/httpd.conf  
and mod\_rewrite

2. if they do not overlap, merge them into one site (i.e. put  
everything in one place and fix routing so everything appears where it  
should)

3. put the other site into some unimportant folder (vendor) or create  
separate folder somewhere in the main app top folder. They do the  
magic with .htaccess/httpd.conf.

You don’t want to put the site in the ‘public\_html’ dir cause that  
would reveal your sources to public. OTOH, you need the the public dir  
of your other site to be visible. So you need to use mod\_rewrite,  
symlinks or copying the files where they belong.

As I said, there might be other options.
