samvera / active_fedora

A Rails interface to the Fedora repository, akin to ActiveModel
Other
54 stars 63 forks source link

rdf 3.2.5 causes superclass mismatch for class DateTime #1466

Closed cziaarm closed 2 years ago

cziaarm commented 2 years ago

.../active-fedora-13.2.5/lib/active_fedora.rb:16:in '<class:Literal>': superclass mismatch for class DateTime (TypeError)

rdf 3.2.4, no problem

cjcolvar commented 2 years ago

This is due to a change in the namespacing of the DateTime class in rdf (see https://github.com/ruby-rdf/rdf/releases/tag/3.2.5) which ActiveFedora was monkey-patching (see https://github.com/samvera/active_fedora/blob/599fd49af7196f07d8791187e3b21756b92842e1/lib/active_fedora.rb#L11-L32)

We should investigate if the monkey patch is still needed in rdf 3.2.5. We'll also need to change this monkey-patch to detect and apply itself to the properly namespaced class.

cziaarm commented 2 years ago

Thanks Chris, we'll hold with rdf 3.2.4 until then.

cjcolvar commented 2 years ago

ActiveFedora 13.2.6 was released with a fix for this issue but it introduced 3 failing tests in Hyrax around date precision beyond milliseconds. This version of the gem was yanked until we have a better fix which should hopefully be soon. For now pinning rdf to < 3.2.5 might be your best bet.