jlin212-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Apr-15 19:47 UTC
Getting Started with Rails - post_comment_url
Hi,
Thanks for a wonderful Getting Started with Rails. I am up to the last
section and just added the comments part.
So while testing and looking over comments_controller.rb;
I see the reference to post_comment_url calll where is this defined.
Below is the message I am getting.
Thanks
ActionController::RoutingError (post_comment_url failed to generate
from {:post_id=>#<Post id: 1, name: "lin", title: "post
1", content:
"content 1", created_at: "2009-04-15 16:56:44", updated_at:
"2009-04-15 16:56:44">, :action=>"show",
:id=>#<Comment id: nil,
commenter: "jake lin", body: "this is a new comment",
post_id: 1,
created_at: nil, updated_at: nil>, :controller=>"comments"},
expected:
{:action=>"show", :controller=>"comments"}, diff:
{:post_id=>#<Post
id: 1, name: "lin", title: "post 1", content: "content
1", created_at:
"2009-04-15 16:56:44", updated_at: "2009-04-15
16:56:44">, :id=>#<Comment id: nil, commenter: "jake
lin", body: "this
is a new comment", post_id: 1, created_at: nil, updated_at: nil>}):
(eval):16:in `post_comment_url''
app/controllers/comments_controller.rb:18:in `create''
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Same problem here!! On Apr 15, 8:47 pm, "jlin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jlin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > Thanks for a wonderfulGettingStartedwithRails. I am up to the last > section and just added the comments part. > So while testing and looking over comments_controller.rb; > I see the reference topost_comment_urlcalll where is this defined. > Below is the message I amgetting. > Thanks > > ActionController::RoutingError (post_comment_urlfailed to generate > from {:post_id=>#<Post id: 1, name: "lin", title: "post 1", content: > "content 1", created_at: "2009-04-15 16:56:44", updated_at: > "2009-04-15 16:56:44">, :action=>"show", :id=>#<Comment id: nil, > commenter: "jake lin", body: "this is a new comment", post_id: 1, > created_at: nil, updated_at: nil>, :controller=>"comments"}, expected: > {:action=>"show", :controller=>"comments"}, diff: {:post_id=>#<Post > id: 1, name: "lin", title: "post 1", content: "content 1", created_at: > "2009-04-15 16:56:44", updated_at: "2009-04-15 > 16:56:44">, :id=>#<Comment id: nil, commenter: "jake lin", body: "this > is a new comment", post_id: 1, created_at: nil, updated_at: nil>}): > (eval):16:in `post_comment_url'' > app/controllers/comments_controller.rb:18:in `create''
Ro wrote:> Same problem here!!Arrgh! I''m also having the same problem! Can someone point me in the right direction of a solution? It''s so frustrating to get this far with rails, but not be able to finish the "Getting Started" Tutorial! I am using Rails 2.3.2 and Ruby 1.8.6. The tutorial does not indicate that Ruby 1.9 is required, does anyone know if it is? I''ve had trouble upgrading Ruby in the past, but I''ll try again now. Thanks to anyone who can help! -- Posted via http://www.ruby-forum.com/.