Skip to content

Load error with active_support 7 #2205

Closed
@Annih

Description

@Annih

With recent release of active_support 7.0.0 my grape apps are not loading anymore.
It fails with the error uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError), with following backtace:

/home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:184:in `current_thread_backend': uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError)
from /home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:103:in `backend='
from /home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:201:in `<module:ActiveSupport>'
from /home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/xml_mini.rb:11:in `<top (required)>'
from /home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/core_ext/array/conversions.rb:3:in `require'
from /home/<redacted>/.bundle/ruby/2.7.0/gems/activesupport-7.0.0/lib/active_support/core_ext/array/conversions.rb:3:in `<top (required)>'
from /home/<redacted>/.bundle/ruby/2.7.0/gems/grape-1.6.0/lib/grape.rb:15:in `require'
from /home/<redacted>/.bundle/ruby/2.7.0/gems/grape-1.6.0/lib/grape.rb:15:in `<top (required)>'

Someone reported an issue on rails (rails/rails#43851) and there even have been an attempt to fix it on this side; but it seems the issue is due to an incorrect way to require active_support's extensions.
According to this guide, it seems you should do a normal require 'active_support' prior to any more specific active_support import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions