# Quick and Simple: How do I get rid of the subdir for my railsapp? (Making it root dir)

**URL:** <https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680>\
**Category:** Rails\
**Created:** [September 27, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680 "2007-09-27T16:27:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARARAR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ARARAR](https://www.ruby-forum.com/u/ARARAR)\
**Post date:** [September 27, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680/1 "2007-09-27T16:27:26Z")

</div>

Ok, I created my rails application called “word”. It consists of:

controllers/application.rb (empty, whatever the default is)  
controllers/word.rb (my project)

views/index.rhtml (my view)

If I go to localhost:3000, I see the “welcome to rails” page.  
If I go to localhost:3000/word/, I get my application.

How do I make my application the root by itself, without the /word/ at  
the end?

I think this is a fairly straightforward issue where I’m overlooking  
something, but it is causing me a lot of problems when deploying the  
application on a web server (same problem, larger scale).

Thanks!

---

<div class="post-metadata">

**Author:** ![ARARAR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ARARAR](https://www.ruby-forum.com/u/ARARAR)\
**Post date:** [September 27, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680/2 "2007-09-27T16:49:10Z")

</div>

You know it’s funny. I’ve been searching for over a day, and come up  
with nothing. I post this question and 20 minutes later here we are:

[http://wiki.rubyonrails.com/rails/pages/HowtoConfigureTheDefaultPageForYourRailsApp](http://wiki.rubyonrails.com/rails/pages/HowtoConfigureTheDefaultPageForYourRailsApp)

---

<div class="post-metadata">

**Author:** ![ARARAR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ARARAR](https://www.ruby-forum.com/u/ARARAR)\
**Post date:** [September 27, 2007, 4:57pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680/3 "2007-09-27T16:57:23Z")

</div>

On 9/27/07, AR [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How do I make my application the root by itself, without the /word/ at  
> the end?
> 
> I think this is a fairly straightforward issue where I’m overlooking  
> something, but it is causing me a lot of problems when deploying the  
> application on a web server (same problem, larger scale).

Did you read that “welcome to rails” page? Last paragraph should tell  
you how to do this.

HTH,  
Isak

---

<div class="post-metadata">

**Author:** ![ARARAR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ARARAR](https://www.ruby-forum.com/u/ARARAR)\
**Post date:** [September 27, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680/4 "2007-09-27T16:59:09Z")

</div>

The page I got only said:

Getting started  
Here’s how to get rolling:

1. Create your databases and edit config/database.yml

2. Use script/generate to create your models and controllers

3. Set up a default route and remove or rename this file

Which didn’t sound obvious at the time, but that’s mostly because I’m  
new to rails (could you tell?).

---

<div class="post-metadata">

**Author:** ![ARARAR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ARARAR](https://www.ruby-forum.com/u/ARARAR)\
**Post date:** [September 27, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/quick-and-simple-how-do-i-get-rid-of-the-subdir-for-my-railsapp-making-it-root-dir/115680/5 "2007-09-27T17:09:10Z")

</div>

Routes. It’s a big part of Rails. It’s more than just setting the  
default page for your app.

basic routes: [Peak Obsession](http://manuals.rubyonrails.com/read/chapter/65)

rest:  
[http://www.softiesonrails.com/2007/3/28/rest-101-part-1-understanding-resources](http://www.softiesonrails.com/2007/3/28/rest-101-part-1-understanding-resources)

You might also want to spend the $ and purchase the agile web dev with  
rails book from The Pragmatic Programmers

> **[Pragmatic Bookshelf: By Developers, For Developers](https://pragprog.com/)**
>
> We improve the lives of professional developers. We create timely, practical books on classic and cutting-edge topics to help you learn and practice your craft, and accelerate your career. Come learn with us.
