JRuby on Windows: "bundler: command not found: rake"
dentarg opened this issue ยท 17 comments
jobs:
build:
name: '${{ matrix.os }}: ${{ matrix.ruby }}'
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
ruby: [ 2.4, 2.5, 2.6, 2.7, jruby, truffleruby ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: ruby -v
- run: bundle install --jobs 4 --retry 3
- run: bundle exec rake
Output from the bundle exec rake
step
Run bundle exec rake
bundle exec rake
shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"
bundler: command not found: rake
Install missing gem executables with `bundle install`
##[error]Process completed with exit code 1.
The bundle install
step before do install rake
I assume JRuby on Windows should work out-of-the-box, right? Am I doing something wrong?
I saw #12, so I checked the asciidoctor-epub3 repo, they are installing bundler themselves, maybe that makes a difference somewhere
Status: see #18 (comment) and below
I'm unsure what's going on.
Could you try if first installing latest bundler (gem install bundler
) helps? Shouldn't be necessary, but at least would rule out a Bundler bug already fixed.
I assume JRuby on Windows should work out-of-the-box, right?
That's the aim but my impression is very few people run JRuby in Windows CI in general.
I know little about Windows, even less so about JRuby on Windows.
For instance, I had to figure out myself which launchers to keep and how to get a ruby
alias for jruby
(jruby/jruby#6042).
One issue I noticed is ruby -v
picks up the system ruby when run with shell: bash
:
https://github.com/eregon/setup-ruby-test/runs/433744376
That's not good.
Various issues here, once again with how to provide a ruby
alias for jruby
that works in both PowerShell and Bash:
ruby -v
in bash just fails on Windows if there is onlyruby.bat
: https://github.com/eregon/setup-ruby-test/runs/433780474?check_suite_focus=truecp jruby.sh ruby
fails because JRuby's.sh
launcher is broken on Windows in JRuby 9.2.9.0: https://github.com/eregon/setup-ruby-test/runs/433786338?check_suite_focus=truecp jruby.exe ruby.exe
fails in PwSh: https://github.com/eregon/setup-ruby-test/runs/433787577?check_suite_focus=true
cp jruby.bash ruby
kind of works but incorrectly deals with double quotes ("
), which is fairly confusing: https://github.com/eregon/setup-ruby-test/runs/433791906?check_suite_focus=true
MRI handles the double quotes fine: https://github.com/eregon/setup-ruby-test/runs/433791899?check_suite_focus=true
Here is a final run:
https://github.com/eregon/setup-ruby-test/runs/433804429?check_suite_focus=true
Still bundler: command not found: rake
.
This must be a JRuby bug, since it works fine on MRI, and installing rake via bundle install
generate very similar rake.bat
and rake
files for both MRI and JRuby.
Could you report it to https://github.com/jruby/jruby/issues ?
I'll fix the PATH issue, but long story short it doesn't seem the cause here.
OK, this is fun bundle exec rake --version
and bundle exec rake default
work, but bundle exec rake
doesn't!
https://github.com/eregon/setup-ruby-test/runs/433859430
Run bundle exec rake --version
rake, version 13.0.1
Run bundle exec rake default
OK
Run bundle exec rake
bundler: command not found: rake
Install missing gem executables with `bundle install`
##[error]Process completed with exit code 1.
I released 1.41.1 which fixes the PATH so there is no default MRI in PATH, just JRuby.
Now ruby --version
and bundle exec rake --version
works in both PwSh and Bash.
The rest (bundle exec rake
broken) is I believe a JRuby bug, please report it there, I don't think I can do anything about it.
@eregon thanks for debugging the issue, I saw your comment at jruby/jruby-launcher#29 (comment), is that something else so I should file another jruby issue about this?
@dentarg That's something else.
I think the issue is JRuby seems to fail to find executables without arguments on Windows ( bundle exec rake default
works, but bundle exec rake
doesn't).
I reported this bug to Bundler some time ago: rubygems/bundler#7602. It can be reproduced on any Windows machine with JRuby, it isn't specific to GitHub Actions.
@slonopotamus Thanks!
I would guess a JRuby issue since it works fine on MRI, and I would think the code for bundle exec
doesn't really rely on the interpreter name. But one never knows.
I reported the bug to JRuby as well, since I think it might be a JRuby bug: jruby/jruby#6053
This was fixed on Bundler side: rubygems/rubygems#3256 (comment)
Seems to be an issue again: jruby/jruby#6053 (comment)
Seems to be an issue again: jruby/jruby#6053 (comment)
This was fixed on Bundler side: rubygems/rubygems#3256 (comment)
Just an update for anyone finding this thread via search or something, it was concluded that the issue is still with Bundler, rubygems/rubygems#3256 is still open at the time of writing this.
Another update, it is a bug in JRuby, fixed on master but not yet released: jruby/jruby#6745