Skip to content

JRuby 9.1.17.0 cannot run bundle install #108

Closed

Description

@JonRowe

Trying to get JRuby builds up and running for RSpec, we tried to install 9.1.17.0 as a known comparison to Travis and it seems bundler is failing to install:

  /home/runner/.rubies/jruby-9.1.17.0/bin/bundle config --local path vendor/bundle
  Cache key: setup-ruby-toolcache-bundle-install-ubuntu-20.04-jruby-9.1.17.0-Gemfile
  /home/runner/.rubies/jruby-9.1.17.0/bin/bundle install --jobs 4
  WARNING: An illegal reflective access operation has occurred
  WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/home/runner/.rubies/jruby-9.1.17.0/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
  WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
  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
  Fetching https://github.com/rspec/rspec.git
  58ce1daf083add0aef88f874b5a049a3146eb909
  HEAD is now at 58ce1da Version 3.11.0.pre
  git version 2.29.0
  git version 2.29.0
  
<snip report template>
  
  ## Backtrace
  
  NoMethodError: undefined method `[]' for nil:NilClass
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:90:in `version'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:147:in `block in copy_to'
    org/jruby/RubyDir.java:323:in `chdir'
/home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/shared_helpers.rb:52:in `block in chdir'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/shared_helpers.rb:51:in `chdir'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:136:in `copy_to'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git.rb:163:in `specs'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:764:in `block in converge_locked_specs'
    org/jruby/RubyArray.java:1735:in `each'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:750:in `converge_locked_specs'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:247:in `resolve'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:158:in `resolve_remotely!'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:303:in `resolve_if_needed'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:84:in `block in run'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/process_lock.rb:12:in `block in lock'
    org/jruby/RubyIO.java:1171:in `open'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/process_lock.rb:9:in `lock'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:73:in `run'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:25:in `install'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli/install.rb:66:in `run'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:256:in `block in install'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/settings.rb:124:in `temporary'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:255:in `install'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/exe/bundle:46:in `block in (root)'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
    /home/runner/.rubies/jruby-9.1.17.0/lib/ruby/gems/shared/gems/bundler-2.1.4/exe/bundle:34:in `<main>'
    org/jruby/RubyKernel.java:974:in `load'
    /home/runner/.rubies/jruby-9.1.17.0/bin/bundle:23:in `<main>'

Any hints appreciated, we know our Gemfile works on Travis, but I'm happy to raise this with the JRuby / Bundler team if you don't think its something specific to the action...

https://github.com/rspec/rspec-core/runs/1387070748?check_suite_focus=true

Activity

  1. eregon commented on Nov 12, 2020

    @eregon
    Member

    It seems unlikely to be specific to this action. Since it works on MRI, it's most likely a JRuby (or Bundler) bug.
    Could you try the bundle ... commands from the log locally and see if it reproduces?

  2. eregon commented on Nov 12, 2020

    @eregon
    Member

    You're using JRuby 9.1.x here, targeting 2.3.3 compat, which probably doesn't work well with Bundler 2.
    MRI 2.3 actually also has issues with Bundler 2, although a different one:

    console.log('Ruby 2.3 has a bug with Bundler 2 (https://github.com/rubygems/rubygems/issues/3570), using Bundler 1 instead on Ruby 2.3')

    So I could force Bundler 1 for JRuby 9.1.x too.

    It's still a JRuby or Bundler bug though, so I think it would be good to report it upstream.

  3. eregon commented on Nov 12, 2020

    @eregon
    Member

    The error is from https://github.com/rubygems/bundler/blob/32a4159325bc181b19e33c3806ea05430f4bbbc7/lib/bundler/source/git/git_proxy.rb#L90
    So it seems JRuby 9.1.x fails to match that Regexp or to capture the output.
    I'd assume git --version is the same for all runners.

    @JonRowe could you try a run with bundler: 1 to see if that solves it for JRuby 9.1.x?
    And a second run with bundler: 2 to confirm it's not a transient issue?

  4. JonRowe commented on Nov 12, 2020

    @JonRowe
    Author

    I'd already done a couple of runs with the defaults, have done two more with a bundler matrix, bundler 1 installs on 9.1.x

  5. JonRowe commented on Nov 12, 2020

    @JonRowe
    Author
  6. eregon commented on Nov 12, 2020

    @eregon
    Member

    OK so JRuby 9.1 works with Bundler 1:
    https://github.com/rspec/rspec-core/runs/1390132947?check_suite_focus=true
    and fails with Bundler 2:
    https://github.com/rspec/rspec-core/runs/1390133159?check_suite_focus=true

    I'll make it so Bundler 1 is always used on JRuby 9.1.

  7. self-assigned this
    on Nov 12, 2020
  8. eregon commented on Nov 12, 2020

    @eregon
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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