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
Gemfile - add Rack and RDoc for testing - failures with Ruby 2.4 & 2.5 #264
Conversation
I believe this problem is about dependencies within the std-lib/bundled gems. Psych runs CI with its tests running against core Ruby. So, it does work with core Ruby 2.4 & 2.5. Problem is, it doesn't work with the RubyGems in 2.4 & 2.5. How to fix? EDIT: I assumed, but I was wrong. It also involves the cache. See https://github.com/MSP-Greg/ruby-setup-ruby/actions/runs/1705378024, which shows the failures, and was done from the same branch as this PR... |
Deivid, sorry for the ping. Noticing some odd things with Actions. Let's say I have a Gemfile which installs Psych, which currently is compatible with Ruby 2.4 and later. There is no Gemfile.lock file, and all the gems are installed in With Ruby 2.5 (and maybe sometimes 2.4, not sure), running
This is the situation when Action's restores a Bundle cache. I haven't tried it locally yet, wondering if you think this may be the issue? It doesn't seem to happen if |
Here's example runs of the issue @MSP-Greg talks about above
|
I did't have a close look, but the issue is indeed RubyGems depending on Psych internally. This has been partly address in recent RubyGems versions by supporting both Psych 3 and 4, so the solution is to update RubyGems when it's not modern enough to include that fix. Since What I mean is that yes, this issue is intermittent depending on whether Bundler ends up hitting the Psych 4 interface old RubyGems is not compatible with. But it doesn't seem worth to me digging further given that upgrading RubyGems fixes the issue in general. |
Now, this is breaking CI for repos, but it's nothing to do with the action. Since the action allows One option is to add an input for RubyGems. I'm not sure what I think of that, or the possible support problems with its interaction with a Bundler input. Another option might be to add bundler options of something like Thoughts? |
If I understood correctly, @eregon accepted a |
Workaround for the situation described in ruby/setup-ruby#264 (comment) It also happened to us in the Puma repo: puma/puma#2782 (comment)
This seems to intermittently fail. The RubyGems that ships with Ruby 2.4 and 2.5 is not compatible with the Psych version that can be installed.
RDoc has a dependency on Psych. Rack is added just so
bundle install --jobs 4
probably needs to run a job after Psych is installed.This is the weird failure that I spoke of, which is why I had
gem update --system
in the PR.