Skip to content

jruby-head #1

Description

@MSP-Greg

@eregon

I just did a PR for a repo that uses the equivalent of 'jruby' and 'jruby-head', which were done with rvm.

Do you hope to generate a 'jruby-head' build in the future? Just wondering, no hurry....

Thanks, Greg

Activity

  1. eregon commented on Feb 12, 2020

    @eregon

    Yes, it's in the plans.
    There is already https://github.com/ruby/jruby-dev-builder but no builds there yet.

  2. eregon commented on Feb 12, 2020

    @eregon

    Which repo is that, and how did you deal with jruby-head there?

  3. MSP-Greg commented on Feb 12, 2020

    @MSP-Greg
    OwnerAuthor

    Which repo is that, and how did you deal with jruby-head there?

    Psych. For the time being, I left the workflow using rvm for jruby and jruby-head. See: https://github.com/ruby/psych/blob/master/.github/workflows/ubuntu-jruby.yml

    The PR I did was ruby/psych#432, and of course, someone didn't like it.

    Thanks for the jruby-head plans. and thanks for all your work with the builds. I don't think the Travis builds were/are tested, at least not fully. So now that yours are, I'm encouraging people to use them.

    As you may have seen, I've got actions-ruby allowing ruby-loco mingw and mswin builds to be used. I don't think the ruby-head mingw build you're using runs test-all, and with MRI Ruby, that's a must.

    I've always been about master building & testing...

  4. eregon commented on Feb 15, 2020

    @eregon

    @MSP-Greg I'm looking at having jruby-head on Windows.
    However I'm hitting some very strange behavior where tar tf lists bin/jruby.exe, but after tar xf the file is not there! On Linux I can extract and I see it's there. And bin/jrubyw.exe extracts fine.
    https://github.com/ruby/jruby-dev-builder/runs/448013601
    Any idea what's going on?

    I guess I could try to use the .zip instead, but such a major bug in tar on Windows seems surprising. Also using a .tar.gz for all platforms avoids code duplication.
    Finally, on .tar.gz release archives of JRuby, I could extract jruby.exe just fine.

  5. eregon commented on Feb 15, 2020

    @eregon

    When trying with unzip I see:

      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jrubyw.exe  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jruby.bash  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jirb.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/ri.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jgem  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jruby.dll  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jirb_swing  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jruby.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jrubyd.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/testrb  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jruby.exe  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jirb  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/irb.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jirb_swing.bat  
    replace jruby-9.2.10.0-SNAPSHOT/bin/jruby? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
    (EOF or read error, treating as "[N]one" ...)
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/jrubyc.bat  
      inflating: jruby-9.2.10.0-SNAPSHOT/bin/rdoc  
    

    Not sure what that means.

  6. MSP-Greg commented on Feb 15, 2020

    @MSP-Greg
    OwnerAuthor

    Give me a second...

    I downloaded it, extracted with 7z GUI, and running jruby --version outputs Cannot find Java 1.5 or higher. which I assume is an error message in the exe file?

    Now, why tar is misbehaving, that might take me a few minutes to figure put...

  7. eregon commented on Feb 15, 2020

    @eregon

    Looks like both tar and unzip have the issue, and they consider two files named jruby and jruby.exe to be the same apparently on Windows? Is that a Windows or filesystem restriction maybe?

    I managed to work around by explicitly not extracting bin/jruby (so only bin/jruby.exe).

  8. MSP-Greg commented on Feb 15, 2020

    @MSP-Greg
    OwnerAuthor

    There's a few tar.exe files on the Actions Windows image. I don't know what node uses, and we're using node for the extraction, right?

    Let me check the MSYS tar and see what it does...

  9. MSP-Greg commented on Feb 15, 2020

    @MSP-Greg
    OwnerAuthor

    Using the MSYS2 tar or the git tar, the below worked. Does that help?

    tar.exe -xzf jruby-head.tar.gz
    
  10. eregon commented on Feb 15, 2020

    @eregon

    I'm using just tar in the bash shell on Windows.
    The command succeeds, but does not extract bin/jruby.exe.

  11. eregon commented on Feb 15, 2020

    @eregon

    For https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.9.0/jruby-dist-9.2.9.0-bin.tar.gz it works fine, probably because jruby is before jruby.exe.

    OTOH, for https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/9.2.10.0-SNAPSHOT/jruby-dist-9.2.10.0-20200214.210645-79-bin.tar.gz jruby.exe is before jruby, and it seems tar/unzip consider it should "override/delete" jruby.exe for some reason.

  12. MSP-Greg commented on Feb 15, 2020

    @MSP-Greg
    OwnerAuthor

    Oddly enough, it was the 2nd file that I used. I never checked to see what Actions uses for Windows bash. Maybe I should do that...

  13. MSP-Greg commented on Feb 15, 2020

    @MSP-Greg
    OwnerAuthor

    This is messy. I'm working on it.

  14. MSP-Greg commented on Feb 16, 2020

    @MSP-Greg
    OwnerAuthor

    I think I'm losing my mind. I thought I posted this AM.

    Anyway, Windows 10 and the image on Actions both have a Windows tar command. Also, the mv command was doing some odd things.

    The following worked, although Windows specific:

    - name: Download latest jruby nightly archive
      if: startsWith(matrix.os, 'windows')
      run: |
        $url=$(ruby find-jruby-head-url.rb)
        echo "$url"
        curl --fail -L -o archive.tar.gz "$url"
        C:\Windows\System32\tar.exe -xzf archive.tar.gz
        gci -Path ./jruby-* -Attributes Directory | Rename-Item -NewName jruby-head
        ls jruby-head/bin
    
  15. eregon commented on Feb 16, 2020

    @eregon

    Thanks! I'll try that.

  16. eregon commented on Feb 16, 2020

    @eregon

    So it looks like tar inside the Bash shell misbehaves and does not extract jruby.exe.
    Running tar in the default Windows shell works and extracts both jruby and jruby.exe.

  17. eregon commented on Feb 16, 2020

    @eregon

    FWIW, jruby-head seems currently broken on Windows: jruby/jruby#6073
    Maybe I should just make it available on non-Windows first.

  18. MSP-Greg commented on Feb 16, 2020

    @MSP-Greg
    OwnerAuthor

    Maybe I need to install Java. How would one detect that the Ruby installation is JRuby on Windows?

  19. eregon commented on Feb 16, 2020

    @eregon

    We found out the root issue, see jruby/jruby-launcher#29 (comment)

  20. MSP-Greg commented on Feb 16, 2020

    @MSP-Greg
    OwnerAuthor

    Yes. I guess I broke it (ruby/rubygems#2119). Sorry...

    EDIT: Reading further, I guess I fixed it in ruby/rubygems#2876.

  21. MSP-Greg commented on Feb 16, 2020

    @MSP-Greg
    OwnerAuthor

    Running jruby-head, I just did

    gem update --system -N
    

    Which seems to have install RG 3.1.2 and Bundler 2.1.2, but it creates binstubs named jgem & jbundle.

    The old gem binstub works...

    Copied jbundle and jbundle.bat and renamed without j, and all is good.

  22. eregon commented on Feb 16, 2020

    @eregon

    No worry, my jruby-head builds work now.
    Here is the release for setup-ruby: https://github.com/ruby/setup-ruby/releases/tag/v1.17.0
    Could you close this issue?

  23. eregon commented on Jul 21, 2025

    @eregon

    For the record, just mv jruby-10.0.1.0 /c/Users/runneradmin/.rubies/jruby-10.0.1.0 in the Bash shell also makes jruby.exe disappear:
    https://github.com/ruby/ruby-builder/actions/runs/16427049853/job/46419853977#step:11:35
    https://github.com/ruby/ruby-builder/actions/runs/16427049853/job/46419853977#step:11:76

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions