Ruby on Rails Sunday, April 6, 2014



On Saturday, 5 April 2014 15:53:25 UTC-4, Ruby-Forum.com User wrote:
Pleas help. This is the log when I try to run the rails server.

Thanks!!

/home/naman/Desktop/multiple_image_upload_carrierwave/config/routes.rb:3:in
`block in <top (required)>': undefined method `redirect_to' for
#<ActionDispatch::Routing::Mapper:0x00000005857730> (NoMethodError)
  from
/home/naman/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in
`instance_exec'


Hard to say without actually seeing config/routes.rb, but I suspect you're looking for the 'redirect' method in the routing DSL, not 'redirect_to':

http://api.rubyonrails.org/classes/ActionDispatch/Routing/Redirection.html#method-i-redirect

--Matt Jones 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/84696a35-6f90-4bc7-a47e-ae9276fc15ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment