开发者

ActionController::RoutingError (No route matches "/users"):

I'm using rails 3 + devise. When a user signs up and there is an error. The app is redirecting to:

http://localhost:3000/users

Showing the error messages, but in the log I see the following:

Started POST "/users" for 127.0.0.1 at Mon Jul 11 20:22:19 -0700 2011
  Processing by RegistrationsController#create as HTML
  Parameters: {"commit"=>"Create my account", "fb_access_token"=>"XXXXX", "authenticity_token"=>"fWd/XXXX=", "utf8"=>"✓", "user"=>{"remember_me"=>"0", "lname"=>"XXXX", "fname"=>"XXXX", "password"=>"[FILTERED]", "email"=>"XXXX-inc.com"}, "fb_uuid"=>"312312"}
  SQL (0.1ms)  BEGIN
  User Load (0.2ms)  SELECT "users"."id" FROM "users" WHERE ("users"."email" = 'brett@companyline-inc.com') LIMIT 1
  SQL (0.2ms)  ROLLBACK
Rendered layouts/_header.html.erb (1.1ms)
Rendered registrations/new.html.erb within layouts/unauthorized (11.3ms)
Completed 200 OK in 45ms (Views: 22.6ms | ActiveRecord: 2.7ms)


Started GET "/users" for 127.0.0.1 at Mon Jul 11 20:22:20 -0700 2011

ActionController::RoutingError (No route matches "/users"):


Rendered /Library/Ruby/Gems/1.8/g开发者_Python百科ems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms)

routes.rb:

  # OmniAuth - for FB Connect
  match '/users/auth/facebook/callback' => 'authentications#create'

  # Devise
  devise_for :users, :controllers => {:registrations => "registrations"}

Why the actionController error?


What does rake routes show you? The order in which you place your routes matters also, since the Rails router picks the first route it matches.

Hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜