no route matches '

M

Mc Ieong

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

...
<h1>Editing order</h1>
<%= 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 :eek:rders
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'


CAN ANYBODY TELL ME WHAT WAS WRONG? HELP!
 
M

Mc Ieong

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?
 
G

Gregory Brown

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
 
B

Brian Candler

Mc said:
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.
 
M

Mc Ieong

Brian said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top