无法加载此类文件 -- mimemagic/overlay (LoadError)

cannot load such file -- mimemagic/overlay (LoadError)

可能是新版本去掉了,请问旧版本如何设置'mimemagic'?

/home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mimemagic/overlay (LoadError)
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
    from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require' ...

我认为这与最近 mimemagic 的变化有关。 https://github.com/rails/rails/issues/41757

在我将 rails 升级到 6.1.3.1 后,我遇到了同样的问题并通过将 Gemfile.lock 文件中的 mimemagic 版本更改为 0.3.8 解决了这个问题。