# No route matches '

**URL:** <https://www.ruby-forum.com/t/no-route-matches/177658>\
**Category:** Ruby\
**Created:** [October 21, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/no-route-matches/177658 "2009-10-21T17:54:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 21, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/no-route-matches/177658/1 "2009-10-21T17:54:01Z")

</div>

HI, I AM A NEWBIE IN RUBY, I WANT TO USE THE JAVASCRIPT, SO I ADD THIS  
LINE IN THE edit.html.erb:

…

# Editing order
\<%= javascript\_include\_tag 'datagrid' %\> ... ...

WHEN THIS VIEW IS RUN, IT GIVE THE FOLLOWING ERROR:

ActionController::RoutingError (No route matches  
“/javascripts/datagrid.js” with  
{:method=\>:get}):  
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in`run’  
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in`start’  
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:in`start’  
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `each' C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in`start’  
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in `start' C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:in`start’

Rendering rescues/layout (not\_found)

MY routes.rb IS JUST LIKE THIS:

map.resources :orders  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’

CAN ANYBODY TELL ME WHAT WAS WRONG? HELP!

---

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 21, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/no-route-matches/177658/2 "2009-10-21T18:30:16Z")

</div>

On Wed, Oct 21, 2009 at 11:54 AM, Mc Ieong [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> CAN ANYBODY TELL ME WHAT WAS WRONG? HELP!

Yes, it looks like your capslock key is broken.

-greg

---

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 22, 2009, 2:07am UTC](https://www.ruby-forum.com/t/no-route-matches/177658/3 "2009-10-22T02:07:46Z")

</div>

> Yes, it looks like your capslock key is broken.

Thank you Greg, my keyboard is fine, just want to distinguish the copied  
text… any idea for my “no route matches” problem?

---

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 22, 2009, 6:33am UTC](https://www.ruby-forum.com/t/no-route-matches/177658/4 "2009-10-22T06:33:23Z")

</div>

On Wed, Oct 21, 2009 at 8:07 PM, Mc Ieong [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Yes, it looks like your capslock key is broken.
> 
> Thank you Greg, my keyboard is fine, just want to distinguish the copied  
> text… any idea for my “no route matches” problem?

Sounds like a Rails issue. You’ll get better help on the Rails mailing  
list for this sort of thing.

-greg

---

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 23, 2009, 12:59am UTC](https://www.ruby-forum.com/t/no-route-matches/177658/5 "2009-10-23T00:59:49Z")

</div>

Brian C. wrote:

> Most likely you want to create a file public/javascripts/datagrid.js  
> containing the javascript code you wish to return to the client.

I found where was the problem: just because the datagrid.js didn’t exist  
in public/javascripts…it sounds that I was very stupid (it might be  
true indeed) of making such a mistake, but the cause was that: I use the  
COPY and PASTE in Komodo Edit to copy the datagrid.js file from one  
project to another, it shown me okay and the newly copied file shown in  
the destination project tree, but actually, the file didn’t get copied!

> Please send all future questions about Rails to a Rails group/mailing  
> list. There are some Rails users here, but this is primarily a forum for  
> Ruby, the programming language. Rails is a large application framework  
> which just happens to be written _in_ Ruby.

Thanks Brian. I had some confusion about Ruby and Rails, sorry about  
that.

---

<div class="post-metadata">

**Author:** ![mcieong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Post date:** [October 22, 2009, 11:58am UTC](https://www.ruby-forum.com/t/no-route-matches/177658/6 "2009-10-22T11:58:18Z")

</div>

Mc Ieong wrote:

> ActionController::RoutingError (No route matches  
> “/javascripts/datagrid.js” with  
> {:method=\>:get}):

This tells you that your web browser has requested  
/javascripts/datagrid.js, but Rails doesn’t know how to respond to this.

Most likely you want to create a file public/javascripts/datagrid.js  
containing the javascript code you wish to return to the client.

Please send all future questions about Rails to a Rails group/mailing  
list. There are some Rails users here, but this is primarily a forum for  
Ruby, the programming language. Rails is a large application framework  
which just happens to be written _in_ Ruby.

Regards,

Brian.
