Git Product home page Git Product logo

Comments (6)

SirRawlins avatar SirRawlins commented on August 12, 2024

Hi Jamie,

This looks to be the gem looking for Delayed Job to palm the jobs off to
the background.

The gem should be smart enough to determine if delayed job isn't available
however something clearly don't working quite right.

I will take a better look and get this patched up.

I shall keep you posted.

Rob
On 6 Jul 2015 8:36 am, "Jaime Iniesta" [email protected] wrote:

Hi, I got this when trying the gem on a Rails 4.1.12 and Devise 3.4.1

NoMethodError - undefined method delay' for #<Devise::Models::Campaignable::Adapters::Mailchimp:0x007fcfebf04958>: devise_campaignable (0.0.3) lib/devise_campaignable/model.rb:63:inlist_manager'
devise_campaignable (0.0.3) lib/devise_campaignable/model.rb:33:in subscribe' activesupport (4.1.12) lib/active_support/callbacks.rb:429:inblock in make_lambda'
activesupport (4.1.12) lib/active_support/callbacks.rb:224:in block in halting_and_conditional' activesupport (4.1.12) lib/active_support/callbacks.rb:503:inblock in call'
activesupport (4.1.12) lib/active_support/callbacks.rb:503:in call' activesupport (4.1.12) lib/active_support/callbacks.rb:86:inrun_callbacks'
activerecord (4.1.12) lib/active_record/callbacks.rb:306:in _create_record' activerecord (4.1.12) lib/active_record/timestamp.rb:57:in_create_record'
activerecord (4.1.12) lib/active_record/persistence.rb:484:in create_or_update' activerecord (4.1.12) lib/active_record/callbacks.rb:302:inblock in create_or_update'
activesupport (4.1.12) lib/active_support/callbacks.rb:113:in call' activesupport (4.1.12) lib/active_support/callbacks.rb:552:inblock (2 levels) in compile'
activesupport (4.1.12) lib/active_support/callbacks.rb:502:in call' activesupport (4.1.12) lib/active_support/callbacks.rb:86:inrun_callbacks'
activerecord (4.1.12) lib/active_record/callbacks.rb:302:in create_or_update' activerecord (4.1.12) lib/active_record/persistence.rb:103:insave'
activerecord (4.1.12) lib/active_record/validations.rb:51:in save' activerecord (4.1.12) lib/active_record/attribute_methods/dirty.rb:21:insave'
activerecord (4.1.12) lib/active_record/transactions.rb:268:in block (2 levels) in save' activerecord (4.1.12) lib/active_record/transactions.rb:329:inblock in with_transaction_returning_status'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in block in transaction' activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:209:inwithin_new_transaction'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in transaction' activerecord (4.1.12) lib/active_record/transactions.rb:208:intransaction'
activerecord (4.1.12) lib/active_record/transactions.rb:326:in with_transaction_returning_status' activerecord (4.1.12) lib/active_record/transactions.rb:268:inblock in save'
activerecord (4.1.12) lib/active_record/transactions.rb:283:in rollback_active_record_state!' activerecord (4.1.12) lib/active_record/transactions.rb:267:insave'
devise (3.4.1) app/controllers/devise/registrations_controller.rb:19:in create' actionpack (4.1.12) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (4.1.12) lib/abstract_controller/base.rb:189:in process_action' actionpack (4.1.12) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (4.1.12) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (4.1.12) lib/active_support/callbacks.rb:113:incall'
activesupport (4.1.12) lib/active_support/callbacks.rb:552:in block (2 levels) in compile' activesupport (4.1.12) lib/active_support/callbacks.rb:502:incall'
activesupport (4.1.12) lib/active_support/callbacks.rb:86:in run_callbacks' actionpack (4.1.12) lib/abstract_controller/callbacks.rb:19:inprocess_action'
actionpack (4.1.12) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.1.12) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action'
activesupport (4.1.12) lib/active_support/notifications.rb:159:in block in instrument' activesupport (4.1.12) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (4.1.12) lib/active_support/notifications.rb:159:in instrument' actionpack (4.1.12) lib/action_controller/metal/instrumentation.rb:30:inprocess_action'
actionpack (4.1.12) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.1.12) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (4.1.12) lib/abstract_controller/base.rb:136:in process' actionview (4.1.12) lib/action_view/rendering.rb:30:inprocess'
actionpack (4.1.12) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.1.12) lib/action_controller/metal/rack_delegation.rb:13:indispatch'
actionpack (4.1.12) lib/action_controller/metal.rb:232:in block in action' actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:82:indispatch'
actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:50:in call' actionpack (4.1.12) lib/action_dispatch/routing/mapper.rb:45:incall'
actionpack (4.1.12) lib/action_dispatch/journey/router.rb:73:in block in call' actionpack (4.1.12) lib/action_dispatch/journey/router.rb:59:incall'
actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:692:in call' meta_request (0.3.4) lib/meta_request/middlewares/app_request_handler.rb:13:incall'
meta_request (0.3.4) lib/meta_request/middlewares/meta_request_handler.rb:13:in call' bullet (4.14.0) lib/bullet/rack.rb:12:incall'
rack-attack (4.2.0) lib/rack/attack.rb:104:in call' warden (1.2.3) lib/warden/manager.rb:35:inblock in call'
warden (1.2.3) lib/warden/manager.rb:34:in call' rack (1.5.5) lib/rack/etag.rb:23:incall'
rack (1.5.5) lib/rack/conditionalget.rb:35:in call' rack (1.5.5) lib/rack/head.rb:11:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/params_parser.rb:27:in call' actionpack (4.1.12) lib/action_dispatch/middleware/flash.rb:254:incall'
rack (1.5.5) lib/rack/session/abstract/id.rb:225:in context' rack (1.5.5) lib/rack/session/abstract/id.rb:220:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/cookies.rb:562:in call' activerecord (4.1.12) lib/active_record/query_cache.rb:36:incall'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in call' activerecord (4.1.12) lib/active_record/migration.rb:380:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/callbacks.rb:29:in block in call' activesupport (4.1.12) lib/active_support/callbacks.rb:82:inrun_callbacks'
actionpack (4.1.12) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.1.12) lib/action_dispatch/middleware/reloader.rb:73:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/remote_ip.rb:76:in call' better_errors (1.1.0) lib/better_errors/middleware.rb:84:inprotected_app_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:79:in better_errors_call' better_errors (1.1.0) lib/better_errors/middleware.rb:56:incall'
rack-contrib (1.2.0) lib/rack/contrib/response_headers.rb:17:in call' meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/debug_exceptions.rb:17:in call' actionpack (4.1.12) lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
railties (4.1.12) lib/rails/rack/logger.rb:38:in call_app' railties (4.1.12) lib/rails/rack/logger.rb:20:inblock in call'
activesupport (4.1.12) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.1.12) lib/active_support/tagged_logging.rb:26:intagged'
activesupport (4.1.12) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.1.12) lib/rails/rack/logger.rb:20:incall'
quiet_assets (1.0.3) lib/quiet_assets.rb:23:in call_with_quiet_assets' actionpack (4.1.12) lib/action_dispatch/middleware/request_id.rb:21:incall'
rack (1.5.5) lib/rack/methodoverride.rb:21:in call' rack (1.5.5) lib/rack/runtime.rb:17:incall'
activesupport (4.1.12) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' rack (1.5.5) lib/rack/lock.rb:17:incall'
actionpack (4.1.12) lib/action_dispatch/middleware/static.rb:84:in call' rack (1.5.5) lib/rack/sendfile.rb:112:incall'
railties (4.1.12) lib/rails/engine.rb:514:in call' railties (4.1.12) lib/rails/application.rb:144:incall'
rack (1.5.5) lib/rack/lock.rb:17:in call' rack (1.5.5) lib/rack/content_length.rb:14:incall'
rack (1.5.5) lib/rack/handler/webrick.rb:60:in service' () Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:inservice'
() Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in run' () Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:inblock in start_thread'


Reply to this email directly or view it on GitHub
#2.

from devise_campaignable.

jaimeiniesta avatar jaimeiniesta commented on August 12, 2024

Oh, I see -- I use Sidekiq for this project, so my User model also responds to :delay.

from devise_campaignable.

SirRawlins avatar SirRawlins commented on August 12, 2024

Thanks @jaimeiniesta - I think I can see the issue now. It looks like the respond_to?() call which checks for the delay methods is looking at the wrong class so getting a false positive.

I'll wrap up a fix for this shortly and we'll see how we get on.

from devise_campaignable.

SirRawlins avatar SirRawlins commented on August 12, 2024

@jaimeiniesta I've just pushed a very small change to the delayed_job_fix branch which tests for the delay() method slightly differently. Could you pull this down and see if it works any better for your Sidekiq setup? I'm hoping respond_to?() should return false now and the method should run synchronously.

from devise_campaignable.

jaimeiniesta avatar jaimeiniesta commented on August 12, 2024

👍 works like a charm :)

from devise_campaignable.

SirRawlins avatar SirRawlins commented on August 12, 2024

@jaimeiniesta thanks for the confirmation on that. I've merged the fix into master.

from devise_campaignable.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.