Comments (6)
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:in
list_manager'
devise_campaignable (0.0.3) lib/devise_campaignable/model.rb:33:insubscribe' activesupport (4.1.12) lib/active_support/callbacks.rb:429:in
block in make_lambda'
activesupport (4.1.12) lib/active_support/callbacks.rb:224:inblock in halting_and_conditional' activesupport (4.1.12) lib/active_support/callbacks.rb:503:in
block in call'
activesupport (4.1.12) lib/active_support/callbacks.rb:503:incall' activesupport (4.1.12) lib/active_support/callbacks.rb:86:in
run_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:increate_or_update' activerecord (4.1.12) lib/active_record/callbacks.rb:302:in
block in create_or_update'
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'
activerecord (4.1.12) lib/active_record/callbacks.rb:302:increate_or_update' activerecord (4.1.12) lib/active_record/persistence.rb:103:in
save'
activerecord (4.1.12) lib/active_record/validations.rb:51:insave' activerecord (4.1.12) lib/active_record/attribute_methods/dirty.rb:21:in
save'
activerecord (4.1.12) lib/active_record/transactions.rb:268:inblock (2 levels) in save' activerecord (4.1.12) lib/active_record/transactions.rb:329:in
block in with_transaction_returning_status'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:201:inblock in transaction' activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:209:in
within_new_transaction'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/database_statements.rb:201:intransaction' activerecord (4.1.12) lib/active_record/transactions.rb:208:in
transaction'
activerecord (4.1.12) lib/active_record/transactions.rb:326:inwith_transaction_returning_status' activerecord (4.1.12) lib/active_record/transactions.rb:268:in
block in save'
activerecord (4.1.12) lib/active_record/transactions.rb:283:inrollback_active_record_state!' activerecord (4.1.12) lib/active_record/transactions.rb:267:in
save'
devise (3.4.1) app/controllers/devise/registrations_controller.rb:19:increate' actionpack (4.1.12) lib/action_controller/metal/implicit_render.rb:4:in
send_action'
actionpack (4.1.12) lib/abstract_controller/base.rb:189:inprocess_action' actionpack (4.1.12) lib/action_controller/metal/rendering.rb:10:in
process_action'
actionpack (4.1.12) lib/abstract_controller/callbacks.rb:20:inblock in process_action' 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' actionpack (4.1.12) lib/abstract_controller/callbacks.rb:19:in
process_action'
actionpack (4.1.12) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (4.1.12) lib/action_controller/metal/instrumentation.rb:32:in
block in process_action'
activesupport (4.1.12) lib/active_support/notifications.rb:159:inblock in instrument' activesupport (4.1.12) lib/active_support/notifications/instrumenter.rb:20:in
instrument'
activesupport (4.1.12) lib/active_support/notifications.rb:159:ininstrument' actionpack (4.1.12) lib/action_controller/metal/instrumentation.rb:30:in
process_action'
actionpack (4.1.12) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' activerecord (4.1.12) lib/active_record/railties/controller_runtime.rb:18:in
process_action'
actionpack (4.1.12) lib/abstract_controller/base.rb:136:inprocess' actionview (4.1.12) lib/action_view/rendering.rb:30:in
process'
actionpack (4.1.12) lib/action_controller/metal.rb:196:indispatch' actionpack (4.1.12) lib/action_controller/metal/rack_delegation.rb:13:in
dispatch'
actionpack (4.1.12) lib/action_controller/metal.rb:232:inblock in action' actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:82:in
dispatch'
actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:50:incall' actionpack (4.1.12) lib/action_dispatch/routing/mapper.rb:45:in
call'
actionpack (4.1.12) lib/action_dispatch/journey/router.rb:73:inblock in call' actionpack (4.1.12) lib/action_dispatch/journey/router.rb:59:in
call'
actionpack (4.1.12) lib/action_dispatch/routing/route_set.rb:692:incall' meta_request (0.3.4) lib/meta_request/middlewares/app_request_handler.rb:13:in
call'
meta_request (0.3.4) lib/meta_request/middlewares/meta_request_handler.rb:13:incall' bullet (4.14.0) lib/bullet/rack.rb:12:in
call'
rack-attack (4.2.0) lib/rack/attack.rb:104:incall' warden (1.2.3) lib/warden/manager.rb:35:in
block in call'
warden (1.2.3) lib/warden/manager.rb:34:incall' rack (1.5.5) lib/rack/etag.rb:23:in
call'
rack (1.5.5) lib/rack/conditionalget.rb:35:incall' rack (1.5.5) lib/rack/head.rb:11:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.1.12) lib/action_dispatch/middleware/flash.rb:254:in
call'
rack (1.5.5) lib/rack/session/abstract/id.rb:225:incontext' rack (1.5.5) lib/rack/session/abstract/id.rb:220:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/cookies.rb:562:incall' activerecord (4.1.12) lib/active_record/query_cache.rb:36:in
call'
activerecord (4.1.12) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:incall' activerecord (4.1.12) lib/active_record/migration.rb:380:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.1.12) lib/active_support/callbacks.rb:82:in
run_callbacks'
actionpack (4.1.12) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (4.1.12) lib/action_dispatch/middleware/reloader.rb:73:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/remote_ip.rb:76:incall' better_errors (1.1.0) lib/better_errors/middleware.rb:84:in
protected_app_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:79:inbetter_errors_call' better_errors (1.1.0) lib/better_errors/middleware.rb:56:in
call'
rack-contrib (1.2.0) lib/rack/contrib/response_headers.rb:17:incall' meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' actionpack (4.1.12) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call'
railties (4.1.12) lib/rails/rack/logger.rb:38:incall_app' railties (4.1.12) lib/rails/rack/logger.rb:20:in
block in call'
activesupport (4.1.12) lib/active_support/tagged_logging.rb:68:inblock in tagged' activesupport (4.1.12) lib/active_support/tagged_logging.rb:26:in
tagged'
activesupport (4.1.12) lib/active_support/tagged_logging.rb:68:intagged' railties (4.1.12) lib/rails/rack/logger.rb:20:in
call'
quiet_assets (1.0.3) lib/quiet_assets.rb:23:incall_with_quiet_assets' actionpack (4.1.12) lib/action_dispatch/middleware/request_id.rb:21:in
call'
rack (1.5.5) lib/rack/methodoverride.rb:21:incall' rack (1.5.5) lib/rack/runtime.rb:17:in
call'
activesupport (4.1.12) lib/active_support/cache/strategy/local_cache_middleware.rb:26:incall' rack (1.5.5) lib/rack/lock.rb:17:in
call'
actionpack (4.1.12) lib/action_dispatch/middleware/static.rb:84:incall' rack (1.5.5) lib/rack/sendfile.rb:112:in
call'
railties (4.1.12) lib/rails/engine.rb:514:incall' railties (4.1.12) lib/rails/application.rb:144:in
call'
rack (1.5.5) lib/rack/lock.rb:17:incall' rack (1.5.5) lib/rack/content_length.rb:14:in
call'
rack (1.5.5) lib/rack/handler/webrick.rb:60:inservice' () Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
service'
() Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:inrun' () Users/jaime/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in
block in start_thread'—
Reply to this email directly or view it on GitHub
#2.
from devise_campaignable.
Oh, I see -- I use Sidekiq for this project, so my User model also responds to :delay
.
from devise_campaignable.
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.
@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.
👍 works like a charm :)
from devise_campaignable.
@jaimeiniesta thanks for the confirmation on that. I've merged the fix into master.
from devise_campaignable.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devise_campaignable.