plz give me the solution to solve the below error
ActionController::RoutingError
ActionController::RoutingError in Issues#new
Showing app/views/issues/_issue.rhtml where line #1 raised:
issue_url failed to generate from {:controller=>"issues",
:action=>"show", :id=>nil}, expected:
{:controller=>"issues",
:action=>"show"}, diff: {:id=>nil}
Extracted source (around line #1):
1: <% form_for :issue, :url=>issue_path(@issue), :html => {:class =>
''horizontal'', :multipart => true, :method => (
@issue.new_record? ?
:post : :put )} do |form| %>
2:
3: <%= error_messages_for ''issue'' %>
4:
Trace of template inclusion: /app/views/issues/new.rhtml
RAILS_ROOT: ./script/../config/..
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
> issue_url failed to generate from {:controller=>"issues", > :action=>"show", :id=>nil}, expected: {:controller=>"issues", > :action=>"show"}, diff: {:id=>nil} >Is at @issue nil? You could test the url generation with issue_path(1), for example, where "1" is a valid id for an issue object. hth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I just started with ROR and I keep getting this error for a simple hello
page. Pease help!
-------- development.log -------------
ActionController::RoutingError (no route found to match
"/demo/say/abc"
with {:method=>:get}):
-------- demo/app/views/abc.rhtml -------------
<html>
<head><title>Hello, Rails!</title></head>
<body><h1>Hello from Rails! The time now is<%=Time.now%>
</h1>
</body></html>
-------- demo/app/views/say_controller.rb -------------
class SayController < ApplicationController
def abc
end
end
-------- default demo/config/routes.rb -------------
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created ->
highest priority.
# Sample of regular route:
# map.connect ''products/:id'', :controller =>
''catalog'', :action =>
''view''
# Keep in mind you can assign values other than :controller and
:action
# Sample of named route:
# map.purchase ''products/:id/purchase'', :controller =>
''catalog'',
:action => ''purchase''
# This route can be invoked with purchase_url(:id => product.id)
# You can have the root of your site routed by hooking up ''''
# -- just remember to delete public/index.html.
# map.connect '''', :controller => "welcome"
# Allow downloading Web Service WSDL as a file with an extension
# instead of a file named ''wsdl''
map.connect '':controller/service.wsdl'', :action =>
''wsdl''
# Install the default route as the lowest priority.
map.connect '':controller/:action/:id.:format''
map.connect '':controller/:action/:id''
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
TYPO error: correct path to teh say_controller : demo/app/controllers/say_controller.rb -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sanika wrote:> I just started with ROR and I keep getting this error for a simple hello > page. Pease help! > > -------- development.log ------------- > ActionController::RoutingError (no route found to match "/demo/say/abc" > with {:method=>:get}): > > -------- demo/app/views/abc.rhtml ------------- > <html> > <head><title>Hello, Rails!</title></head> > <body><h1>Hello from Rails! The time now is<%=Time.now%> </h1> > </body></html> > > -------- demo/app/views/say_controller.rb ------------- > class SayController < ApplicationController > def abc > end > end > > > -------- default demo/config/routes.rb ------------- > > ActionController::Routing::Routes.draw do |map| > # The priority is based upon order of creation: first created -> > highest priority. > > # Sample of regular route: > # map.connect ''products/:id'', :controller => ''catalog'', :action => > ''view'' > # Keep in mind you can assign values other than :controller and > :action > > # Sample of named route: > # map.purchase ''products/:id/purchase'', :controller => ''catalog'', > :action => ''purchase'' > # This route can be invoked with purchase_url(:id => product.id) > > # You can have the root of your site routed by hooking up '''' > # -- just remember to delete public/index.html. > # map.connect '''', :controller => "welcome" > > # Allow downloading Web Service WSDL as a file with an extension > # instead of a file named ''wsdl'' > map.connect '':controller/service.wsdl'', :action => ''wsdl'' > > # Install the default route as the lowest priority. > map.connect '':controller/:action/:id.:format'' > map.connect '':controller/:action/:id'' > end >Try: /say/abc as in: http://localhost:3000/say/abc -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Wang wrote:> Try: > > /say/abc > > as in: > > http://localhost:3000/say/abc > > > -- > Michael WangThanks. This worked -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---