Skip to main content

problem with dj_remixes

Rails • Asked by vinod seth

we are developing ruby on rails application
Ruby version:- 5.20
Rails:- 2.5.0
Gems we are using
dj_remixes (0.2.4)
delayed_job (4.1.5)
delayed_job_active_record (4.1.3)

we are using dj_remixes to implement delayed jobs. but when we try and upload we get an error.

when we comment a line in below mentioned file dj_remixes the code works fine.
lib/dj_remixes/unique_validator.rb
line number :- 16

function call :- validates_with UniqueDJValidator

Error msg

NoMethodError (undefined method `handler_object' for

Delayed::Backend::ActiveRecord::Job:0x00007f3f06227ad0

Did you mean? handler?):

activemodel (5.2.0) lib/active_model/attribute_methods.rb:430:in method_missing'
app/models/job/upload_job.rb:13:in
block in unique?'
activerecord (5.2.0) lib/active_record/relation/delegation.rb:41:in each'
activerecord (5.2.0) lib/active_record/relation/delegation.rb:41:in
each'
app/models/job/upload_job.rb:13:in collect'
app/models/job/upload_job.rb:13:in
unique?'
/home/ubuntu/.rvm/gems/ruby-2.5.1/bundler/gems/dj_remixes-e33bb57b6849/lib/dj_remixes/unique_validator.rb:6:in validate'
activesupport (5.2.0) lib/active_support/callbacks.rb:426:in
block in make_lambda'
activesupport (5.2.0) lib/active_support/callbacks.rb:198:in block (2 levels) in halting'
activesupport (5.2.0) lib/active_support/callbacks.rb:606:in
block (2 levels) in default_terminator'
activesupport (5.2.0) lib/active_support/callbacks.rb:605:in catch'
activesupport (5.2.0) lib/active_support/callbacks.rb:605:in
block in default_terminator'
activesupport (5.2.0) lib/active_support/callbacks.rb:199:in block in halting'
activesupport (5.2.0) lib/active_support/callbacks.rb:513:in
block in invoke_before'
activesupport (5.2.0) lib/active_support/callbacks.rb:513:in each'
activesupport (5.2.0) lib/active_support/callbacks.rb:513:in
invoke_before'
activesupport (5.2.0) lib/active_support/callbacks.rb:131:in run_callbacks'
activesupport (5.2.0) lib/active_support/callbacks.rb:816:in
run_validate_callbacks'
activemodel (5.2.0) lib/active_model/validations.rb:409:in run_validations!'
activemodel (5.2.0) lib/active_model/validations/callbacks.rb:118:in
block in run_validations!'
activesupport (5.2.0) lib/active_support/callbacks.rb:98:in run_callbacks'
activesupport (5.2.0) lib/active_support/callbacks.rb:816:in
_run_validation_callbacks'
activemodel (5.2.0) lib/active_model/validations/callbacks.rb:118:in run_validations!'
activemodel (5.2.0) lib/active_model/validations.rb:339:in
valid?'
activerecord (5.2.0) lib/active_record/validations.rb:67:in valid?'
activerecord (5.2.0) lib/active_record/validations.rb:84:in
perform_validations'
activerecord (5.2.0) lib/active_record/validations.rb:46:in save'
activerecord (5.2.0) lib/active_record/transactions.rb:310:in
block (2 levels) in save'
activerecord (5.2.0) lib/active_record/transactions.rb:386:in block in with_transaction_returning_status'
activerecord (5.2.0) lib/active_record/connection_adapters/abstract/database_statements.rb:254:in
block in transaction'
activerecord (5.2.0) lib/active_record/connection_adapters/abstract/transaction.rb:230:in block in within_new_transaction'
/usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/monitor.rb:226:in
mon_synchronize'
activerecord (5.2.0) lib/active_record/connection_adapters/abstract/transaction.rb:227:in within_new_transaction'
activerecord (5.2.0) lib/active_record/connection_adapters/abstract/database_statements.rb:254:in
transaction'
activerecord (5.2.0) lib/active_record/transactions.rb:212:in transaction'
activerecord (5.2.0) lib/active_record/transactions.rb:383:in
with_transaction_returning_status'
activerecord (5.2.0) lib/active_record/transactions.rb:310:in block in save'
activerecord (5.2.0) lib/active_record/transactions.rb:325:in
rollback_active_record_state!'
activerecord (5.2.0) lib/active_record/transactions.rb:309:in save'
activerecord (5.2.0) lib/active_record/suppressor.rb:44:in
save'
delayed_job (4.1.5) lib/delayed/backend/base.rb:19:in block (2 levels) in enqueue_job'
delayed_job (4.1.5) lib/delayed/lifecycle.rb:61:in
block in initialize'
delayed_job (4.1.5) lib/delayed/lifecycle.rb:66:in execute'
delayed_job (4.1.5) lib/delayed/lifecycle.rb:40:in
run_callbacks'
delayed_job (4.1.5) lib/delayed/backend/base.rb:17:in block in enqueue_job'
delayed_job (4.1.5) lib/delayed/backend/base.rb:16:in
tap'
delayed_job (4.1.5) lib/delayed/backend/base.rb:16:in enqueue_job'
delayed_job (4.1.5) lib/delayed/backend/base.rb:12:in
enqueue'
/home/ubuntu/.rvm/gems/ruby-2.5.1/bundler/gems/dj_remixes-e33bb57b6849/lib/dj_remixes/dj_remixes.rb:7:in method_missing'
app/models/job/base.rb:52:in
enqueue
'
app/controllers/upload_controller.rb:12:in upload'
actionpack (5.2.0) lib/action_controller/metal/basic_implicit_render.rb:6:in
send_action'
actionpack (5.2.0) lib/abstract_controller/base.rb:194:in process_action'
actionpack (5.2.0) lib/action_controller/metal/rendering.rb:30:in
process_action'
actionpack (5.2.0) lib/abstract_controller/callbacks.rb:42:in block in process_action'
activesupport (5.2.0) lib/active_support/callbacks.rb:132:in
run_callbacks'
actionpack (5.2.0) lib/abstract_controller/callbacks.rb:41:in process_action'
actionpack (5.2.0) lib/action_controller/metal/rescue.rb:22:in
process_action'
actionpack (5.2.0) lib/action_controller/metal/instrumentation.rb:34:in block in process_action'
activesupport (5.2.0) lib/active_support/notifications.rb:168:in
block in instrument'
activesupport (5.2.0) lib/active_support/notifications/instrumenter.rb:23:in instrument'
activesupport (5.2.0) lib/active_support/notifications.rb:168:in
instrument'
actionpack (5.2.0) lib/action_controller/metal/instrumentation.rb:32:in process_action'
actionpack (5.2.0) lib/action_controller/metal/params_wrapper.rb:256:in
process_action'
activerecord (5.2.0) lib/active_record/railties/controller_runtime.rb:24:in process_action'
actionpack (5.2.0) lib/abstract_controller/base.rb:134:in
process'
actionview (5.2.0) lib/action_view/rendering.rb:32:in process'
actionpack (5.2.0) lib/action_controller/metal.rb:191:in
dispatch'
actionpack (5.2.0) lib/action_controller/metal.rb:252:in dispatch'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:52:in
dispatch'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:34:in serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:52:in
block in serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in each'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in
serve'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:840:in call'
rack-raw-upload (1.1.1) lib/rack/raw_upload.rb:72:in
convert_and_pass_on'
rack-raw-upload (1.1.1) lib/rack/raw_upload.rb:18:in call'
rack (2.0.5) lib/rack/tempfile_reaper.rb:15:in
call'
rack (2.0.5) lib/rack/etag.rb:25:in call'
rack (2.0.5) lib/rack/conditional_get.rb:38:in
call'
rack (2.0.5) lib/rack/head.rb:12:in call'
actionpack (5.2.0) lib/action_dispatch/http/content_security_policy.rb:18:in
call'
rack (2.0.5) lib/rack/session/abstract/id.rb:232:in context'
rack (2.0.5) lib/rack/session/abstract/id.rb:226:in
call'
actionpack (5.2.0) lib/action_dispatch/middleware/cookies.rb:670:in call'
activerecord (5.2.0) lib/active_record/migration.rb:559:in
call'
actionpack (5.2.0) lib/action_dispatch/middleware/callbacks.rb:28:in block in call'
activesupport (5.2.0) lib/active_support/callbacks.rb:98:in
run_callbacks'
actionpack (5.2.0) lib/action_dispatch/middleware/callbacks.rb:26:in call'
actionpack (5.2.0) lib/action_dispatch/middleware/executor.rb:14:in
call'
actionpack (5.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:61:in call'
web-console (3.6.2) lib/web_console/middleware.rb:135:in
call_app'
web-console (3.6.2) lib/web_console/middleware.rb:30:in block in call'
web-console (3.6.2) lib/web_console/middleware.rb:20:in
catch'
web-console (3.6.2) lib/web_console/middleware.rb:20:in call'
actionpack (5.2.0) lib/action_dispatch/middleware/show_exceptions.rb:33:in
call'
railties (5.2.0) lib/rails/rack/logger.rb:38:in call_app'
railties (5.2.0) lib/rails/rack/logger.rb:26:in
block in call'
activesupport (5.2.0) lib/active_support/tagged_logging.rb:71:in block in tagged'
activesupport (5.2.0) lib/active_support/tagged_logging.rb:28:in
tagged'
activesupport (5.2.0) lib/active_support/tagged_logging.rb:71:in tagged'
railties (5.2.0) lib/rails/rack/logger.rb:26:in
call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in call'
actionpack (5.2.0) lib/action_dispatch/middleware/remote_ip.rb:81:in
call'
actionpack (5.2.0) lib/action_dispatch/middleware/request_id.rb:27:in call'
rack (2.0.5) lib/rack/method_override.rb:22:in
call'
rack (2.0.5) lib/rack/runtime.rb:22:in call'
activesupport (5.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in
call'
actionpack (5.2.0) lib/action_dispatch/middleware/executor.rb:14:in call'
actionpack (5.2.0) lib/action_dispatch/middleware/static.rb:127:in
call'
rack (2.0.5) lib/rack/sendfile.rb:111:in call'
railties (5.2.0) lib/rails/engine.rb:524:in
call'
puma (3.11.4) lib/puma/configuration.rb:225:in call'
puma (3.11.4) lib/puma/server.rb:632:in
handle_request'
puma (3.11.4) lib/puma/server.rb:446:in process_client'
puma (3.11.4) lib/puma/server.rb:306:in
block in run'
puma (3.11.4) lib/puma/thread_pool.rb:120:in `block in spawn_thread'


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.