Cannot load such file -- /ext/gems/3.2/gems/mail-2.8.0/lib/mail/indifferent_hash.rb

Happy new year, all of You!

Just noticed, my application cannot start:

from -e:1:in `<main>'
/ext/gems/3.2/gems/bootsnap-1.15. /lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- /ext/gems/3.2/gems/mail-2.8.0/lib/mail/indifferent_hash.rb (LoadError)

Having a look, it is not surprizing:

# ls -la /ext/gems/3.2/gems/mail-2.8.0/lib/mail/indifferent_hash.rb  
-rw-r-----  1 root  wheel  3874 Jan  2 01:14 /ext/gems/3.2/gems/mail-2.8.0/lib/mail/indifferent_hash.rb

Ordinary applications are not supposed to read that file. That’s the case on all my systems, and that’s also how that piece is packaged.

And it is more than one file in that package without general read perms.

And this is also the case with the 2.8.0.rc3/2/1 packages. So this is present since April last year!

And they know it since then:

They talk about it. They just don’t manage to fix it.

1 Like

As seen in your best bet is to pin to the previous working version, e.g.:

gem "mail", "~> 2.7.1"

If you use dependabot, it will notify you of new releases and you can test those

1 Like