Skip to content

Support Ruby 3.1.0 for Windows #253

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

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

koic
Copy link
Contributor

@koic koic commented Dec 31, 2021

Follow up to oneclick/rubyinstaller2#255 (comment).

This PR adds Ruby 3.1.0 to windows-version.js.

Follow up to oneclick/rubyinstaller2#255 (comment).

This PR adds Ruby 3.1.0 to windows-version.js.
@eregon eregon force-pushed the support_ruby_3_1_0_for_windows branch from 3d207f9 to 71f1808 Compare January 3, 2022 12:01
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

(I removed the extra newline)

@eregon
Copy link
Member

eregon commented Jan 3, 2022

Unfortunately it fails:
https://github.com/ruby/setup-ruby/runs/4690740303?check_suite_focus=true
https://github.com/ruby/setup-ruby/runs/4690739904?check_suite_focus=true

  C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\Ruby\3.1.0\x64\bin\gem.cmd install bundler -v "~> 2""
  ERROR:  Error installing bundler:
  	"bundle" from bundler conflicts with C:/hostedtoolcache/windows/Ruby/3.1.0/x64/bin/bundle

@larskanis Does RubyInstaller change bin/bundle? That can cause issues like this, I'm not sure how to fix.
cc @MSP-Greg

3.1.0 ships with bundler 2.3.3, and latest bundler release is 2.3.4 so at least it's not the same bundler version.

@larskanis
Copy link
Contributor

@larskanis Does RubyInstaller change bin/bundle? That can cause issues like this, I'm not sure how to fix.

No, there's no modification from the RubyInstaller side. I can reproduce this issue locally. Seems to be a problem in rubygems. I'll check this.

For the time being, the workaround is to call

gem install bundler --force

@eregon
Copy link
Member

eregon commented Jan 3, 2022

@larskanis Thanks for the quick reply. @MSP-Greg found a workaround by updating to latest RubyGems (#224 (comment)), so maybe it's a RubyGems/Ruby bug as in 3.1.0 ship with a bin/bundler different than the one RubyGems would generate?

@eregon
Copy link
Member

eregon commented Jan 3, 2022

@larskanis Could you post the start of your bin/bundle file on rubygems/rubygems#5245 ? I think that would help to investigate.

kenichiice added a commit to test-unit/test-unit-runner-junitxml that referenced this pull request Jan 5, 2022
kenichiice added a commit to test-unit/test-unit-runner-junitxml that referenced this pull request Jan 5, 2022
@eregon
Copy link
Member

eregon commented Jan 10, 2022

I'll try --force to unblock the situation, let's see if that works.
#224 likely needs more time (notably I need to review in depth)

@MSP-Greg
Copy link
Collaborator

Just to be clear, Windows Ruby 3.1.0, head and ucrt are compiled with the MSYS2 UCRT64 tool chain, which is not installed on either windows-2019 or windows-2022. Extension gems or c source may compile on windows-2019, which currently has MINGW64 tools.

Note that they may or may not pass their CI, but mixing the MINGW64 & UCRT64 tools chains is a bad idea and can cause very odd problems. MINGW64 links to a set of Windows 'legacy' dll files, UCRT64 links to a newer set.

@eregon
Copy link
Member

eregon commented Jan 10, 2022

This PR passes all the tests now, I think it's worth merging so people can try Ruby 3.1 on Windows.
I agree we need the fixes from #224 but I also think it will need some more time to be ready to be merged.
It's the same situation with ruby-head on Windows, and so far nobody complained about it.

@eregon eregon merged commit 4726835 into ruby:master Jan 10, 2022
@koic koic deleted the support_ruby_3_1_0_for_windows branch January 11, 2022 02:36
koic added a commit to koic/rubocop that referenced this pull request Jan 11, 2022
@koic
Copy link
Contributor Author

koic commented Jan 11, 2022

Thank you @eregon and @MSP-Greg!

deivid-rodriguez added a commit to deivid-rodriguez/setup-ruby that referenced this pull request Jul 16, 2025
It was originally added by ruby#253,
in order to fix CI. However, now CI passes without it so I assume this
was fixed by rubyinstaller2.

Force actually bypasses dependency constraints so it's actually
installing the latest Bundler in a version of Ruby that's incompatible
with it.
eregon pushed a commit that referenced this pull request Jul 16, 2025
It was originally added by #253,
in order to fix CI. However, now CI passes without it so I assume this
was fixed by rubyinstaller2.

Force actually bypasses dependency constraints so it's actually
installing the latest Bundler in a version of Ruby that's incompatible
with it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy