Skip to content

Commit

Permalink
Fix uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionS…
Browse files Browse the repository at this point in the history
…tate

After the move to Rails 7, the following error was causing tests to fail:
```
uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState
```

The solution was to explicitly require `active_support` before requiring the Hash and Array core extensions. This is the suggested approach given in the [Active Support documentation][1], but presumably the previous combination of Ruby and Rails was more forgiving of its omittance.

This change is based on the solution identified here:
rails/rails#43851 (comment)

[1]: https://guides.rubyonrails.org/active_support_core_extensions.html#stand-alone-active-support
  • Loading branch information
ollietreend committed Feb 16, 2022
1 parent c953e81 commit fa98052
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/govspeak.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "active_support"
require "active_support/core_ext/hash"
require "active_support/core_ext/array"
require "erb"
Expand Down

0 comments on commit fa98052

Please sign in to comment.