Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two loader.rb files not copied from ext to lib #45

Open
sronsiek opened this issue Jan 4, 2023 · 0 comments
Open

Two loader.rb files not copied from ext to lib #45

sronsiek opened this issue Jan 4, 2023 · 0 comments

Comments

@sronsiek
Copy link

sronsiek commented Jan 4, 2023

OS: SLES 15 SP4
ruby: ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux-gnu] (from SLES distro)
digest gem version: 3.1.1 (latest avail at time of writing)

The actionmailer gem from v7.0.1, as well as the mail gem from v2.8.0 have new dependent gems net-imap, net.pop, net-smtp. Of these, net-imap has dependent gem digest. Thus from Rails 7.0.1 or if using mail 2.8.0 or higher, users are forced to use the digest gem.

As part of an app upgrade to Rails 6.1.7 I included mail 2.8.0, and found my application build breaking: all calls to bundler (in my case the first call is bundle exec rake assets:precompile) following bundle install fail with:

#16 3.145 rake aborted!
#16 3.145 LoadError: cannot load such file -- digest/loader
#16 3.145 <my app path>/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.13.0-x86_64-linux/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require' 

In my case I pre-compile gems first and push the compiles gems to a geminabox server. This is then accessed by the application build.

The problem appears to be that two loader files are not copied from the ext tree of the gem to the lib tree. When I copied the files manually the issue was resolved:

DIGEST=<my app path>/vendor/bundle/ruby/2.5.0/gems/digest-3.1.1-x86_64-linux
mkdir -p ${DIGEST}/lib/digest/sha2
cp -p ${DIGEST}/ext/digest/lib/digest/loader.rb      ${DIGEST}/lib/digest/loader.rb
cp -p ${DIGEST}/ext/digest/lib/digest/sha2/loader.rb ${DIGEST}/lib/digest/sha2/loader.rb

This problem also appears to be discussed in github.com/rubygems/rubygems/issues/5619

Can the gem be corrected so that copying of the loader files is no longer required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant