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