No route matches '

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:inrun’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in each' C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in start' C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:instart’

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!

On Wed, Oct 21, 2009 at 11:54 AM, Mc Ieong [email protected] wrote:

CAN ANYBODY TELL ME WHAT WAS WRONG? HELP!

Yes, it looks like your capslock key is broken.

-greg

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?

On Wed, Oct 21, 2009 at 8:07 PM, Mc Ieong [email protected] 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

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.

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs