# Creating 2nd rails app on Dreamhost?

**URL:** <https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697>\
**Category:** Rails\
**Created:** [April 13, 2006, 3:33am UTC](https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697 "2006-04-13T03:33:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 13, 2006, 3:33am UTC](https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697/1 "2006-04-13T03:33:11Z")

</div>

My hosting provider is Dreamhost, and for some reason can’t figure out  
something that should not be that hard to do. Being a linux newbie  
isn’t helping me much either 🙂

On Dreamhost, each domain gets its own subdirectory. To setup my web  
app for each domain, I just go to the parent directory of that domain in  
a telnet session, and type “rails [mydomain.com](http://mydomain.com)”, and it all works out.

Now, I want to add another web app, but I don’t have the new domain  
transferred yet (and I won’t for a while). I want to be able to access  
the app through a browser while I’m developing/testing/showing to the  
client.

What’s the right way to setup a new, 2nd rails app on an existing  
domain, and yet keep it separate from the app that already is there?  
It’s perfectly ok if I need to do something like  
[mydomain.com/anotherapp/](http://mydomain.com/anotherapp/) to see it in a browser.

Eventually when we go “live” we’ll change over the DNS entries, and at  
that point I can put the 2nd app in its own directory.

Any other Dreamhosters tried this before?

And any gotchas about the routes.rb I should know about, etc.?

Thanks a lot!  
Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 13, 2006, 3:39am UTC](https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697/2 "2006-04-13T03:39:57Z")

</div>

Jeff C. wrote:

> On Dreamhost, each domain gets its own subdirectory. To setup my  
> web  
> app for each domain, I just go to the parent directory of that domain in  
> a telnet session, and type “rails [mydomain.com](http://mydomain.com)”, and it all works out.

> What’s the right way to setup a new, 2nd rails app on an existing  
> domain, and yet keep it separate from the app that already is there?  
> It’s perfectly ok if I need to do something like  
> [mydomain.com/anotherapp/](http://mydomain.com/anotherapp/) to see it in a browser.

Easiest way is probably to setup a subdomain on your current domain and  
then deploy to there as normal.

Dreamhost will setup a folder for the subdomain just like it does for  
the main domain, so there are no real gotchas that I know of.

When your other domain comes live, just transfer it to there and all  
should be fine.

hth

–  
R.Livsey

> **[Livsey.org](http://livsey.org)**
>
> I’ve been using Firebase with Ember.js quite a lot recently and have just
> released Fireplace, a library to integrate the two more easily. It

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 13, 2006, 5:48am UTC](https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697/3 "2006-04-13T05:48:36Z")

</div>

Richard L. wrote:

> Easiest way is probably to setup a subdomain on your current domain and  
> then deploy to there as normal.

Rizan Reza wrote:

> And I believe if you setup in an existing directory as ’  
> [mydomain.com/anotherapp/](http://mydomain.com/anotherapp/)', it will not work since it will already have  
> rails directories.

Great idea! That solution is far simpler than I was imagining.

Thanks Richard and Rizwan.

Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 13, 2006, 5:32am UTC](https://www.ruby-forum.com/t/creating-2nd-rails-app-on-dreamhost/57697/4 "2006-04-13T05:32:37Z")

</div>

And I believe if you setup in an existing directory as ’  
[mydomain.com/anotherapp/](http://mydomain.com/anotherapp/)‘, it will not work since it will already have  
rails  
directories. So, you could create a subdomain like ’  
[yourrailsapp.mydomain.com](http://yourrailsapp.mydomain.com)’ and run rails command onto it.

By the way, you setup your domain in Manage Domains section.

Rizwan
