Skip to content

JRuby 9.1.17.0 cannot run bundle install #108

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

Closed
JonRowe opened this issue Nov 12, 2020 · 7 comments
Closed

JRuby 9.1.17.0 cannot run bundle install #108

JonRowe opened this issue Nov 12, 2020 · 7 comments
Assignees

Comments

@JonRowe
Copy link

JonRowe commented Nov 12, 2020

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

@eregon
Copy link
Member

eregon commented Nov 12, 2020

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?

@eregon
Copy link
Member

eregon commented Nov 12, 2020

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.

@eregon
Copy link
Member

eregon commented Nov 12, 2020

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?

@JonRowe
Copy link
Author

JonRowe commented Nov 12, 2020

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

@JonRowe
Copy link
Author

JonRowe commented Nov 12, 2020

@eregon
Copy link
Member

eregon commented Nov 12, 2020

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.

@eregon eregon self-assigned this Nov 12, 2020
@eregon
Copy link
Member

eregon commented Nov 12, 2020

Fixed in https://github.com/ruby/setup-ruby/releases/tag/v1.50.3, thanks for the report.

@eregon eregon closed this as completed Nov 12, 2020
hibachrach added a commit to hibachrach/react-rails that referenced this issue Sep 12, 2022
Unfortunately Bundler 2 and JRuby 9.1 are not compatible on GitHub
actions (see here: ruby/setup-ruby#108) which
leads to failures.

JRuby matches (MRI) Ruby 2.5 (which we just removed from the testing
matrix) in terms of features so we may want to even upgrade it
hibachrach added a commit to hibachrach/react-rails that referenced this issue Sep 12, 2022
Unfortunately Bundler 2 and JRuby 9.1 are not compatible on GitHub
actions (see here: ruby/setup-ruby#108) which
leads to failures.

Additionally, due to the `webdrivers` gem as a testing dependency
needing upgrading, 9.2 is also a no-go.

JRuby 9.3 matches (MRI) Ruby 2.6 which we just made the floor of the testing
matrix, so this is likely a good version to match anyhow.
apple0820 added a commit to apple0820/react-rails that referenced this issue Aug 15, 2023
Unfortunately Bundler 2 and JRuby 9.1 are not compatible on GitHub
actions (see here: ruby/setup-ruby#108) which
leads to failures.

Additionally, due to the `webdrivers` gem as a testing dependency
needing upgrading, 9.2 is also a no-go.

JRuby 9.3 matches (MRI) Ruby 2.6 which we just made the floor of the testing
matrix, so this is likely a good version to match anyhow.
Oleksandr0305 added a commit to Oleksandr0305/react-rails that referenced this issue Feb 1, 2025
Unfortunately Bundler 2 and JRuby 9.1 are not compatible on GitHub
actions (see here: ruby/setup-ruby#108) which
leads to failures.

Additionally, due to the `webdrivers` gem as a testing dependency
needing upgrading, 9.2 is also a no-go.

JRuby 9.3 matches (MRI) Ruby 2.6 which we just made the floor of the testing
matrix, so this is likely a good version to match anyhow.
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

2 participants