I have a Rails 5 app, running both a postgresql DB for application data and MongoDB (mongoid) for analytics, generated by the fantastic ahoy gem.
Everything works great until I switch to asynchronous geocoding in config/initializers/ahoy.rb
, which generates the error below:
ActiveJob::SerializationError (Unsupported argument type: Visit):
The app is using delayed_job, for background processing.
I there a workaround for this issue, or is this caused by incompatibility between mongoid and delayed_job?
Try adding the GlobalId mixin to your model
class Visit
include GlobalID::Identification
end