Forum: Ruby on Rails ActionController::RoutingError

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
407763800e3c974985dc805ef8f2b8cb?d=identicon&s=25 pradeep (Guest)
on 2007-03-02 14:29
plz give me the solution to solve the below error


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| %>
3:   <%= error_messages_for 'issue' %>

Trace of template inclusion: /app/views/issues/new.rhtml

RAILS_ROOT: ./script/../config/..
B3bcedc723a39bd0395f3c68cbca49e4?d=identicon&s=25 toby privett (Guest)
on 2007-03-02 14:40
(Received via mailing list)
> 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

This topic is locked and can not be replied to.