# Routing Error

**URL:** <https://www.ruby-forum.com/t/routing-error/122365>\
**Category:** Rails\
**Created:** [December 7, 2007, 12:00am UTC](https://www.ruby-forum.com/t/routing-error/122365 "2007-12-07T00:00:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [December 7, 2007, 12:00am UTC](https://www.ruby-forum.com/t/routing-error/122365/1 "2007-12-07T00:00:18Z")

</div>

Hello,

I’m just starting to learn Ruby on Rails. I’m following a tutorial in  
a book but the examples are not working, I keep getting Routing Error  
“no route found to match “/\look\at” with {:method=\>:get}”

What I have is a pretty simple example. I’ve put all the files in the  
correct directories

* * *

## In ‘…\app\controllers\look\_controller’ I have: class LookController \< ApplicationController def at @data = params[:text1] end end

In ‘…\app\views\look\at.rhtml’ I have:

 Your name is \<%= @data %\> ------------------------------------------------------------------- In '..\public I have:   
 Please enter your name.  
  
 ---------------------------------------------------------------------

When I start the server and navigate to [http://localhost:3000/input.html](http://localhost:3000/input.html)  
I get the input.html page. When I use the submit button I get the  
Routing Error. I have no idea why. At this point learning Ruby on  
Rails isn’t much fun ☹

Please help.

Thank you.

Brad

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [December 7, 2007, 1:55am UTC](https://www.ruby-forum.com/t/routing-error/122365/2 "2007-12-07T01:55:27Z")

</div>

Um… You’re not supposed to put your form as a page in the public  
directory.  
That’s reserved for things more like pictures/javascript/stylesheets.

You should make another view for your form which can then post to the  
other  
action.

On Dec 7, 2007 9:29 AM, Brad [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> * * *
> 
> ```
> <title></title>
> </head>
> 
> ```
> 
> >

–  
Ryan B.

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [December 7, 2007, 2:08am UTC](https://www.ruby-forum.com/t/routing-error/122365/3 "2007-12-07T02:08:19Z")

</div>

On 6 Dec 2007, at 22:59, Brad wrote:

> ```
> <body>
> <form action = "\look\at">
> <br>
> 
> ```

You shouldn’t be using backslashes, even if you’re on a machine which  
uses backslash as its path delimiter. When you’re dealing with URLs, /  
is the one true path delimiter.

Fred

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [December 7, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/routing-error/122365/4 "2007-12-07T16:02:09Z")

</div>

Thank you for your help. It was the backslashes, now I feel silly for  
not trying that before I posted 🙂

Thanks again.

Brad

On Dec 6, 7:07 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
