Bug#977979: jruby fails to run without declaring the DEBIAN_DISABLE_RUBYGEMS_INTEGRATION environment variable

Louis-Philippe Véronneau pollo at debian.org
Wed Dec 23 19:31:51 GMT 2020


Package: jruby
Version: 9.1.17.0-3
Severity: grave

Dear maintainers,

It seems jruby fails to run without declaring the
DEBIAN_DISABLE_RUBYGEMS_INTEGRATION environment variable:

jruby -e "puts 'Hello World'"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by jnr.posix.JavaLibCHelper$ReflectiveAccess to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of jnr.posix.JavaLibCHelper$ReflectiveAccess
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
NameError: undefined method `default_specifications_dir' for class `#<Class:0x24bdb479>'
  singleton class at /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:84
           <main> at /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:58
          require at org/jruby/RubyKernel.java:956
           <main> at /usr/share/jruby/lib/ruby/stdlib/rubygems.rb:1
          require at org/jruby/RubyKernel.java:956
           <main> at /usr/share/jruby/lib/ruby/stdlib/rubygems.rb:1347
             load at org/jruby/RubyKernel.java:974
           <main> at uri:classloader:/jruby/kernel/gem_prelude.rb:1

Any value for DEBIAN_DISABLE_RUBYGEMS_INTEGRATION makes it work again:

DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=hamburger jruby -e "puts 'Hello World'"
Hello World

Talking with Antonio Terceiro, it seems the underlying problem comes
from the current jruby version in Debian bundling an old version of
rubygems, that isn't compatible with the code in
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb.

Setting DEBIAN_DISABLE_RUBYGEMS_INTEGRATION seems like a cheap
trick, as ruby gems in debian are 2.7 compatible, and our
jruby is 2.3 compatible.

Really, jruby shouldn't load gems from /usr/lib/ruby/vendor_ruby
(but I'll open another bug about this).

-- 
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   pollo at debian.org / veronneau.org
  ⠈⠳⣄



-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20201223/10253988/attachment.sig>


More information about the pkg-java-maintainers mailing list