Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `users_url' for #<Devise::RegistrationsController:0x00000005018470> #2457

Closed
gwuix2 opened this issue Jun 6, 2013 · 15 comments

Comments

@gwuix2
Copy link

gwuix2 commented Jun 6, 2013

I get this error with my app:
https://github.com/gwuix2/anabol

On user registration with devise.
With omniauth facebook login everything works.

I opened a stackoverflow question on it:
http://stackoverflow.com/questions/16971357/devise-undefined-method-users-url-for-deviseregistrationscontroller0x0000

@josevalim
Copy link
Contributor

Can you provide the stacktrace? You don't provide a resources :users in your router, so the error is expected, we just need to know from where it is coming from.

@gwuix2
Copy link
Author

gwuix2 commented Jun 7, 2013

Just learned what is the stacktrace:

NoMethodError - undefined method users_url' for #<Devise::RegistrationsController:0x000000048e5a90>: actionpack (3.2.13) lib/action_dispatch/routing/polymorphic_routes.rb:129:inpolymorphic_url'
actionpack (3.2.13) lib/action_dispatch/routing/url_for.rb:150:in url_for' actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:105:in_compute_redirect_to_location'
actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:74:in redirect_to' actionpack (3.2.13) lib/action_controller/metal/flash.rb:25:inredirect_to'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:60:in block in redirect_to' activesupport (3.2.13) lib/active_support/notifications.rb:123:inblock in instrument'
activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.13) lib/active_support/notifications.rb:123:ininstrument'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:59:in redirect_to' ajaxify_rails (0.8.3) lib/ajaxify_rails/action_controller_additions.rb:93:inredirect_to'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:135:in redirect_to' actionpack (3.2.13) lib/action_controller/metal/responder.rb:193:innavigation_behavior'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:162:in rescue in to_html' actionpack (3.2.13) lib/action_controller/metal/responder.rb:160:into_html'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:153:in respond' actionpack (3.2.13) lib/action_controller/metal/responder.rb:146:incall'
actionpack (3.2.13) lib/action_controller/metal/mime_responds.rb:239:in respond_with' devise (2.1.2) app/controllers/devise/registrations_controller.rb:27:increate'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (3.2.13) lib/abstract_controller/base.rb:167:inprocess_action'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:inblock in process_action'
activesupport (3.2.13) lib/active_support/callbacks.rb:458:in _run__1268311120205137404__process_action__1071343919862663914__callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _run_process_action_callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:inprocess_action'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.2.13) lib/active_support/notifications.rb:123:inblock in instrument'
activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.13) lib/active_support/notifications.rb:123:ininstrument'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action'
activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (3.2.13) lib/abstract_controller/base.rb:121:inprocess'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in process' actionpack (3.2.13) lib/action_controller/metal.rb:203:indispatch'
actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.2.13) lib/action_controller/metal.rb:246:inblock in action'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in dispatch' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:incall'
actionpack (3.2.13) lib/action_dispatch/routing/mapper.rb:42:in call' journey (1.0.4) lib/journey/router.rb:68:inblock in call'
journey (1.0.4) lib/journey/router.rb:56:in call' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:incall'
omniauth (1.1.4) lib/omniauth/strategy.rb:184:in call!' omniauth (1.1.4) lib/omniauth/strategy.rb:164:incall'
warden (1.2.1) lib/warden/manager.rb:35:in block in call' warden (1.2.1) lib/warden/manager.rb:34:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' rack (1.4.5) lib/rack/etag.rb:23:incall'
rack (1.4.5) lib/rack/conditionalget.rb:35:in call' actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in call' actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:incall'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in context' rack (1.4.5) lib/rack/session/abstract/id.rb:205:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in call' activerecord (3.2.13) lib/active_record/query_cache.rb:64:incall'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in _run__2156893408397782722__call__2255708113892286636__callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in call' better_errors (0.9.0) lib/better_errors/middleware.rb:84:inprotected_app_call'
better_errors (0.9.0) lib/better_errors/middleware.rb:79:in better_errors_call' better_errors (0.9.0) lib/better_errors/middleware.rb:56:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
railties (3.2.13) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.13) lib/rails/rack/logger.rb:16:inblock in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.13) lib/rails/rack/logger.rb:16:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.5) lib/rack/methodoverride.rb:21:incall'
rack (1.4.5) lib/rack/runtime.rb:17:in call' activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:incall'
rack (1.4.5) lib/rack/lock.rb:15:in call' actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:incall'
railties (3.2.13) lib/rails/engine.rb:479:in call' railties (3.2.13) lib/rails/application.rb:223:incall'
rack (1.4.5) lib/rack/content_length.rb:14:in call' railties (3.2.13) lib/rails/rack/log_tailer.rb:17:incall'
thin (1.5.1) lib/thin/connection.rb:81:in block in pre_process' thin (1.5.1) lib/thin/connection.rb:79:inpre_process'
thin (1.5.1) lib/thin/connection.rb:54:in process' thin (1.5.1) lib/thin/connection.rb:39:inreceive_data'
eventmachine (1.0.3) lib/eventmachine.rb:187:in run' thin (1.5.1) lib/thin/backends/base.rb:63:instart'
thin (1.5.1) lib/thin/server.rb:159:in start' rack (1.4.5) lib/rack/handler/thin.rb:13:inrun'
rack (1.4.5) lib/rack/server.rb:268:in start' railties (3.2.13) lib/rails/commands/server.rb:70:instart'
railties (3.2.13) lib/rails/commands.rb:55:in block in <top (required)>' railties (3.2.13) lib/rails/commands.rb:50:in<top (required)>'
script/rails:6:in <main>' script/rails:0:in

'

@josevalim
Copy link
Contributor

Looking at the stacktrace, we can see this:

ajaxify_rails (0.8.3) lib/ajaxify_rails/action_controller_additions.rb:93:inredirect_to'

It seems this one is the culprit as it is trying to generate a url for the user model, and such url does not exist. So you should either get rid of this dependency or define the route to make it happy.

@gwuix2
Copy link
Author

gwuix2 commented Jun 7, 2013

I deleted ajaxify gem from Gemfile, but same error occurs.

NoMethodError - undefined method users_url' for #<Devise::RegistrationsController:0x00000003ba7450>: actionpack (3.2.13) lib/action_dispatch/routing/polymorphic_routes.rb:129:inpolymorphic_url'
actionpack (3.2.13) lib/action_dispatch/routing/url_for.rb:150:in url_for' actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:105:in_compute_redirect_to_location'
actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:74:in redirect_to' actionpack (3.2.13) lib/action_controller/metal/flash.rb:25:inredirect_to'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:60:in block in redirect_to' activesupport (3.2.13) lib/active_support/notifications.rb:123:inblock in instrument'
activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.13) lib/active_support/notifications.rb:123:ininstrument'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:59:in redirect_to' actionpack (3.2.13) lib/action_controller/metal/responder.rb:135:inredirect_to'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:193:in navigation_behavior' actionpack (3.2.13) lib/action_controller/metal/responder.rb:162:inrescue in to_html'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:160:in to_html' actionpack (3.2.13) lib/action_controller/metal/responder.rb:153:inrespond'
actionpack (3.2.13) lib/action_controller/metal/responder.rb:146:in call' actionpack (3.2.13) lib/action_controller/metal/mime_responds.rb:239:inrespond_with'
devise (2.1.2) app/controllers/devise/registrations_controller.rb:27:in create' actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:167:in process_action' actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in block in process_action' activesupport (3.2.13) lib/active_support/callbacks.rb:458:in_run__4159298926632633380__process_action__3745782819591530044__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:inprocess_action'
actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:in process_action' activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:121:in process' actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:inprocess'
actionpack (3.2.13) lib/action_controller/metal.rb:203:in dispatch' actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:indispatch'
actionpack (3.2.13) lib/action_controller/metal.rb:246:in block in action' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:indispatch'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in call' actionpack (3.2.13) lib/action_dispatch/routing/mapper.rb:42:incall'
journey (1.0.4) lib/journey/router.rb:68:in block in call' journey (1.0.4) lib/journey/router.rb:56:incall'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in call' omniauth (1.1.4) lib/omniauth/strategy.rb:184:incall!'
omniauth (1.1.4) lib/omniauth/strategy.rb:164:in call' warden (1.2.1) lib/warden/manager.rb:35:inblock in call'
warden (1.2.1) lib/warden/manager.rb:34:in call' actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
rack (1.4.5) lib/rack/etag.rb:23:in call' rack (1.4.5) lib/rack/conditionalget.rb:35:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:in call' actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:in call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:incontext'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in call' actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:incall'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in call' activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in block in call' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in_run__3171792883399595661__call__3680441127942329225__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in call' actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:incall'
better_errors (0.9.0) lib/better_errors/middleware.rb:84:in protected_app_call' better_errors (0.9.0) lib/better_errors/middleware.rb:79:inbetter_errors_call'
better_errors (0.9.0) lib/better_errors/middleware.rb:56:in call' actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in call' railties (3.2.13) lib/rails/rack/logger.rb:32:incall_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in block in call' activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:intagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in call' actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:incall'
rack (1.4.5) lib/rack/methodoverride.rb:21:in call' rack (1.4.5) lib/rack/runtime.rb:17:incall'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.4.5) lib/rack/lock.rb:15:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in call' railties (3.2.13) lib/rails/engine.rb:479:incall'
railties (3.2.13) lib/rails/application.rb:223:in call' rack (1.4.5) lib/rack/content_length.rb:14:incall'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in call' thin (1.5.1) lib/thin/connection.rb:81:inblock in pre_process'
thin (1.5.1) lib/thin/connection.rb:79:in pre_process' thin (1.5.1) lib/thin/connection.rb:54:inprocess'
thin (1.5.1) lib/thin/connection.rb:39:in receive_data' eventmachine (1.0.3) lib/eventmachine.rb:187:inrun'
thin (1.5.1) lib/thin/backends/base.rb:63:in start' thin (1.5.1) lib/thin/server.rb:159:instart'
rack (1.4.5) lib/rack/handler/thin.rb:13:in run' rack (1.4.5) lib/rack/server.rb:268:instart'
railties (3.2.13) lib/rails/commands/server.rb:70:in start' railties (3.2.13) lib/rails/commands.rb:55:inblock in <top (required)>'
railties (3.2.13) lib/rails/commands.rb:50:in <top (required)>' script/rails:6:in

'
script/rails:0:in `'

@josevalim
Copy link
Contributor

Oops, sorry then. I will take a further look!

@josevalim josevalim reopened this Jun 7, 2013
@gwuix2
Copy link
Author

gwuix2 commented Jun 7, 2013

Tryin to sign in with omniauth facebook:

RuntimeError - Devise trackable could not save #<User id: 22, email: "[email protected]", encrypted_password: "$2a$10$2KQ1xz6MncwCeAkYpQ46PuUigwpbfZKayllNRzlqACe0...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 1, current_sign_in_at: "2013-06-07 14:38:02", last_sign_in_at: "2013-06-07 14:38:02", current_sign_in_ip: "127.0.0.1", last_sign_in_ip: "127.0.0.1", created_at: "2013-06-07 14:38:02", updated_at: "2013-06-07 14:38:02", admin: nil, provider: "facebook", uid: "100000665750510", name: "Barna Kovács", oauth_token: nil, oauth_expires_at: nil>.Please make sure a model using trackable can be saved at sign in.:
devise (2.2.4) lib/devise/models/trackable.rb:31:in update_tracked_fields!' devise (2.2.4) lib/devise/hooks/trackable.rb:7:inblock in <top (required)>'
warden (1.2.1) lib/warden/hooks.rb:14:in block in _run_callbacks' warden (1.2.1) lib/warden/hooks.rb:9:in_run_callbacks'
warden (1.2.1) lib/warden/manager.rb:53:in _run_callbacks' warden (1.2.1) lib/warden/proxy.rb:179:inset_user'
devise (2.2.4) lib/devise/controllers/helpers.rb:124:in sign_in' devise (2.2.4) lib/devise/controllers/helpers.rb:244:insign_in_and_redirect'
app/controllers/users/omniauth_callbacks_controller.rb:7:in facebook' actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in process_action' actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in block in process_action' activesupport (3.2.8) lib/active_support/callbacks.rb:458:in_run__735118623665039291__process_action__2298235143883885290__callbacks'
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
...

@gwuix2
Copy link
Author

gwuix2 commented Jun 8, 2013

Problem solved:

after_create a Profile was created with User. Wrong argument was passed, and the :slug of Profile wasn't unique, that fired a false or nil somewhere which ended in an unsaved user.

Devise works perfectly :)

@gwuix2 gwuix2 closed this as completed Jun 8, 2013
@martindemello
Copy link

martindemello commented Dec 12, 2021

I'm running into this again, with a fresh project started with rails-7.0.0.rc1, and devise installed and set up exactly following https://stucklucky.medium.com/how-to-set-up-rails-devise-5bd39732629f . The stack trace from the logs:

   User Create (0.3ms)  INSERT INTO "users" ("email", "encrypted_password", "reset_password_token", "reset_password_sent_at", "remember_created_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)  [["email", "[email protected]"], ["encrypted_password", "[FILTERED]"], ["reset_password_token", "[FILTERED]"], ["reset_password_sent_at", "[FILTERED]"], ["remember_created_at", nil], ["created_at", "2021-12-12 04:51:37.015570"], ["updated_at", "2021-12-12 04:51:37.015570"]]
  TRANSACTION (14.4ms)  commit transaction
Redirected to 
Completed 500 Internal Server Error in 253ms (ActiveRecord: 14.9ms | Allocations: 13838)


  
NoMethodError (undefined method `user_url' for #<Devise::RegistrationsController:0x0000000000c328>):
  
actionpack (7.0.0.rc1) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `public_send'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `polymorphic_method'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/polymorphic_routes.rb:116:in `polymorphic_url'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/url_for.rb:187:in `full_url_for'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/url_for.rb:170:in `url_for'
actionpack (7.0.0.rc1) lib/action_controller/metal/redirecting.rb:144:in `_compute_redirect_to_location'
actionpack (7.0.0.rc1) lib/action_controller/metal/redirecting.rb:89:in `redirect_to'
actionpack (7.0.0.rc1) lib/action_controller/metal/flash.rb:62:in `redirect_to'
actionpack (7.0.0.rc1) lib/action_controller/metal/instrumentation.rb:42:in `block in redirect_to'
activesupport (7.0.0.rc1) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.0.rc1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.0.rc1) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.0.0.rc1) lib/action_controller/metal/instrumentation.rb:41:in `redirect_to'
responders (3.0.1) lib/action_controller/responder.rb:147:in `redirect_to'
responders (3.0.1) lib/action_controller/responder.rb:207:in `navigation_behavior'
responders (3.0.1) lib/action_controller/responder.rb:174:in `rescue in to_html'
responders (3.0.1) lib/action_controller/responder.rb:171:in `to_html'
responders (3.0.1) lib/action_controller/responder.rb:165:in `respond'
responders (3.0.1) lib/action_controller/responder.rb:158:in `call'
responders (3.0.1) lib/action_controller/respond_with.rb:213:in `respond_with'
devise (9f5b83750eef) app/controllers/devise/registrations_controller.rb:25:in `create'
actionpack (7.0.0.rc1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.0.0.rc1) lib/abstract_controller/base.rb:214:in `process_action'
actionpack (7.0.0.rc1) lib/action_controller/metal/rendering.rb:53:in `process_action'
actionpack (7.0.0.rc1) lib/abstract_controller/callbacks.rb:234:in `block in process_action'
activesupport (7.0.0.rc1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
actiontext (7.0.0.rc1) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (7.0.0.rc1) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
activesupport (7.0.0.rc1) lib/active_support/callbacks.rb:127:in `instance_exec'
activesupport (7.0.0.rc1) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
activesupport (7.0.0.rc1) lib/active_support/callbacks.rb:138:in `run_callbacks'
actionpack (7.0.0.rc1) lib/abstract_controller/callbacks.rb:233:in `process_action'
actionpack (7.0.0.rc1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (7.0.0.rc1) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
activesupport (7.0.0.rc1) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.0.rc1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.0.rc1) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.0.0.rc1) lib/action_controller/metal/instrumentation.rb:66:in `process_action'
actionpack (7.0.0.rc1) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.0.0.rc1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (7.0.0.rc1) lib/abstract_controller/base.rb:151:in `process'
actionview (7.0.0.rc1) lib/action_view/rendering.rb:39:in `process'
actionpack (7.0.0.rc1) lib/action_controller/metal.rb:188:in `dispatch'
actionpack (7.0.0.rc1) lib/action_controller/metal.rb:251:in `dispatch'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack (7.0.0.rc1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (7.0.0.rc1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (7.0.0.rc1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.0.0.rc1) lib/action_dispatch/routing/route_set.rb:850:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/cookies.rb:693:in `call'
activerecord (7.0.0.rc1) lib/active_record/migration.rb:603:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (7.0.0.rc1) lib/active_support/callbacks.rb:99:in `run_callbacks'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
railties (7.0.0.rc1) lib/rails/rack/logger.rb:36:in `call_app'
railties (7.0.0.rc1) lib/rails/rack/logger.rb:25:in `block in call'
activesupport (7.0.0.rc1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (7.0.0.rc1) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (7.0.0.rc1) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (7.0.0.rc1) lib/rails/rack/logger.rb:25:in `call'
sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (7.0.0.rc1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/server_timing.rb:20:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/static.rb:23:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (7.0.0.rc1) lib/action_dispatch/middleware/host_authorization.rb:116:in `call'
railties (7.0.0.rc1) lib/rails/engine.rb:530:in `call'
puma (5.5.2) lib/puma/configuration.rb:249:in `call'
puma (5.5.2) lib/puma/request.rb:77:in `block in handle_request'
puma (5.5.2) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.5.2) lib/puma/request.rb:76:in `handle_request'
puma (5.5.2) lib/puma/server.rb:447:in `process_client'
puma (5.5.2) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

@zaouch-bahae-eddine
Copy link

I have the same error above, there is any solution founded guys ?

NoMethodError (undefined method `user_url' for #Devise::RegistrationsController:0x0000000001b3c8)

@lavilet
Copy link

lavilet commented Dec 28, 2021

hey @martindemello @zaouch-bahae-eddine , looks like this issue (present in rails 7) is being tackled here: #5439

@SalomaoMiguel
Copy link

In config/devise.rb include line:
config.navigational_formats = ['/', :html, :turbo_stream]
before rails s

@JARG85
Copy link

JARG85 commented Jun 2, 2022

great @SalomaoMiguel thank u!!!

@xspynks
Copy link

xspynks commented Jun 25, 2022

thank you, @SalomaoMiguel.

@CyborTronik
Copy link

Thanks @SalomaoMiguel this works for rails 7

@yudamuliawan07
Copy link

if you have devise.rb is in initializer folder, you can add this:
config.navigational_formats = ['/', :html, :turbo_stream]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

10 participants