Commit 540484a
Fixes the latest rubygems installation error with Ruby 3.0
If set up `rubygems: latest` in workflow,
it will cause the error with Ruby 3.0 because the latest rubygems does not support Ruby 3.0.
Ref. https://rubygems.org/gems/rubygems-update
### Error message
```
Updating RubyGems
/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem --version
3.2.33
Default RubyGems version is 3.2.33
Updating RubyGems to latest version
/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem update --system
ERROR: Error installing rubygems-update:
rubygems-update-3.6.1 requires Ruby version >= 3.1.0. The current ruby version is 3.0.7.220.
ERROR: While executing gem ... (NoMethodError)
undefined method `version' for nil:NilClass
Updating rubygems-update
Took 2.86 seconds
Error: The process '/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem' failed with exit code 1
```
### How to reproduce
```
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
rubygems: latest
```1 parent 401c19e commit 540484a
3 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
| 193 | + | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
0 commit comments