Skip to content
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

Fixes the latest rubygems installation error with Ruby 3.0 #676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Watson1978
Copy link

@Watson1978 Watson1978 commented Dec 19, 2024

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

@Watson1978 Watson1978 force-pushed the latest-rubygems branch 2 times, most recently from c8ac511 to 34c9234 Compare December 19, 2024 02:34
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
```
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.

Thank you!

@Watson1978
Copy link
Author

@eregon Could you please merge & release this PR ?
thanks

MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request Dec 22, 2024
MSP-Greg added a commit to puma/puma that referenced this pull request Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants