setup-ruby: Bundler install appears broken on Ruby 2.2
Ensure the following before filing this issue
-
I verified it reproduces with the latest version with
- uses: ruby/setup-ruby@v1(see Versioning policy) -
I tried to reproduce the issue locally by following the workflow steps (including all commands done by
ruby/setup-ruby, except forDownloading Ruby&Extracting Ruby), and it did not reproduce locally (if it does reproduce locally, it’s not a ruby/setup-ruby issue)
Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
Link to the failed workflow job (must be a public workflow job, so the necessary information is available)
https://github.com/jeremyevans/ruby-refrigerator/actions/runs/4716774683/jobs/8364821711
Any other notes?
This has failed in multiple projects, and appears to be a general issue with Ruby 2.2. Here’s another example: https://github.com/jeremyevans/sequel/actions/runs/4723218962/jobs/8378878032
Installation of bundler works locals:
$ gem22 install bundler -v '~> 1.0'
Fetching: bundler-1.17.3.gem (100%)
Successfully installed bundler-1.17.3
1 gem installed
$ ruby22 -v
ruby 2.2.10p489 (2018-03-28 revision 63023) [x86_64-openbsd]
$ gem22 -v
2.4.5.5
Example output:
Installing Bundler
Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2
/opt/hostedtoolcache/Ruby/2.2.10/x64/bin/gem install bundler -v ~> 1.0
ERROR: While executing gem ... (RuntimeError)
Marshal.load reentered at marshal_load
Took 0.36 seconds
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Use ubuntu-20.04 for test using Ruby 2.2 * https://github.com/ruby/setup-ruby/issues/496#issuecomment-1520667671 — committed to ruby/setup-ruby by eregon a year ago
- Disable test workflow for Ruby-2.2 Appears to be broken. See also: https://github.com/ruby/setup-ruby/issues/496 — committed to remvee/exifr by remvee a year ago
- Disable test workflow for Ruby-2.2 Appears to be broken. See also: https://github.com/ruby/setup-ruby/issues/496 — committed to remvee/exifr by remvee a year ago
- Stop testing Ruby 2.2 in CI as it no longer works with ubuntu-latest — committed to rack/rack-test by jeremyevans a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Change 'ubuntu-latest' to 'ubuntu-20.04' https://github.com/ruby/setup-ruby/issues/496 — committed to konsolebox/digest-kangarootwelve-ruby by konsolebox a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Add all remaining ruby 2.x versions to build matrix These builds now all pass for the time being, so since they were in the original .travis.yml I'm adding them here. To get ruby 2.2 working with th... — committed to futurelearn/valid_email by deleted user a year ago
- Change 'ubuntu-latest' to 'ubuntu-20.04' https://github.com/ruby/setup-ruby/issues/496 — committed to konsolebox/digest-kangarootwelve-ruby by konsolebox a year ago
- Change 'ubuntu-latest' to 'ubuntu-20.04' https://github.com/ruby/setup-ruby/issues/496 — committed to konsolebox/digest-kangarootwelve-ruby by konsolebox a year ago
- Update ruby.yml - Add more Ruby versions - Change 'ubuntu-latest' to 'ubuntu-20.04' (https://github.com/ruby/setup-ruby/issues/496) - Change ruby/setup-ruby version to v1.152.0 — committed to konsolebox/digest-xxhash-ruby by konsolebox a year ago
- Update ruby.yml - Add more Ruby versions - Change 'ubuntu-latest' to 'ubuntu-20.04' (https://github.com/ruby/setup-ruby/issues/496) - Change ruby/setup-ruby version to v1.152.0 — committed to konsolebox/digest-kangarootwelve-ruby by konsolebox a year ago
- Workaround legacy Ruby issue See https://github.com/ruby/setup-ruby/issues/496 for the discussion. — committed to DataDog/libdatadog by ivoanjo a year ago
- Workaround legacy Ruby issue See https://github.com/ruby/setup-ruby/issues/496 for the discussion. — committed to DataDog/libdatadog by ivoanjo a year ago
- Workaround legacy Ruby issue See https://github.com/ruby/setup-ruby/issues/496 for the discussion. — committed to DataDog/libdatadog by ivoanjo a year ago
- Install Abseil on Ubuntu 20.04, not 22.04 As there are issues running Bundler with older Rubies on Ubuntu 22.04 (see https://github.com/ruby/setup-ruby/issues/496), try to install Abseil on the exist... — committed to mudge/re2-ci by mudge a year ago
- Add re2 2023-07-01 to the CI build matrix As re2 2023-07-01 requires Abseil, we use Rob Savoury's Build Tools PPA to install it on Ubuntu 20.04. As the legacy Ruby builds run on Ubuntu 16.04 and the ... — committed to mudge/re2 by mudge a year ago
This is possibly related to the deprecation of the RubyGems dependencies API. There’s a brownout today (2023-04-17). See https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html and https://blog.rubygems.org/2023/04/07/dependency-api-deprecation-delayed.html.
Ruby 2.1 has also been encountering issues (see #493).
There is no workaround for Ruby 2.2 and Ubuntu 22.04 and this action. Try using old Docker images instead: https://hub.docker.com/_/ruby/tags?page=1&name=2.2&ordering=-last_updated
So from the above runs it seems to always work on 20.04, and always fail on 22.04. So a simple workaround for now is using ubuntu 20.04 for such old Rubies (and when 20.04 is removed there will be no way to get Ruby 2.2 to run on a GitHub-hosted Linux runner probably).