carmen-ruby/carmen

Error on require: uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError)

wu-lee opened this issue · 1 comments

Something's up with ActiveSupport, which is breaking Carmen.

To replicate: run this minimal script

require 'carmen.rb'

And be greeted with an error like this:

.gems/ruby/2.7.0/gems/activesupport-7.0.1/lib/active_support/xml_mini.rb:184:in `current_thread_backend': uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError)

Searching for the error message finds this:

rails/rails#43851

There's a fix mentioned, or possibly a workaround, which entails including some files:

require "active_support"
require "active_support/testing/time_helpers"

I believe that the fix needs to be made in this gem. Before this line there should be a require 'active_support'.

Here is the relevant context: rails/rails#43852 (comment). Apparently (and this is news to me too) all usage of AS is supposed to start with require 'active_support'... and then you require the specific libraries you need.