Skip to content

ruby: Revert rubygems to 3.0.6 for ruby 2.6 and earlier#76757

Closed
andersk wants to merge 2 commits intoNixOS:masterfrom
andersk:rubygems-ruby-conflict
Closed

ruby: Revert rubygems to 3.0.6 for ruby 2.6 and earlier#76757
andersk wants to merge 2 commits intoNixOS:masterfrom
andersk:rubygems-ruby-conflict

Conversation

@andersk
Copy link
Contributor

@andersk andersk commented Jan 1, 2020

Motivation for this change

The rubygems upgrade from 3.0.6 to 3.1.2 (#76495) broke vagrant at runtime. Specifically, it

  • works with ruby 2.6 and rubygems 3.0.6,
  • fails with ruby 2.6 and rubygems 3.1.2,
  • works with ruby 2.7 and rubygems 3.1.2,

perhaps because bundler 2.1 vendored by rubygems 3.1 conflicts with bundler 1.17 vendored by ruby 2.6.

Fixes #76629.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @vrthra @manveru @alyssais @zimbatm @aneeshusa

The rubygems upgrade from 3.0.6 to 3.1.2 (NixOS#76495) broke vagrant at
runtime.  Specifically, it

* works with ruby 2.6 and rubygems 3.0.6,
* fails with ruby 2.6 and rubygems 3.1.2,
* works with ruby 2.7 and rubygems 3.1.2,

perhaps because bundler 2.1 vendored by rubygems 3.1 conflicts with
bundler 1.17 vendored by ruby 2.6.

Fixes NixOS#76629.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@ofborg ofborg bot added the 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. label Jan 1, 2020
@alyssais
Copy link
Member

alyssais commented Jan 1, 2020

I’m strongly opposed to reverting just because one package is incompatible.

Just running `vagrant --version` was insufficient to catch NixOS#76629, but
this would have.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@ofborg ofborg bot requested review from manveru and vrthra January 1, 2020 00:43
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Jan 1, 2020
@andersk
Copy link
Contributor Author

andersk commented Jan 1, 2020

I’m open to any suggestions—what should we do?

Note that I’m not reverting anything for ruby 2.7, with which the new rubygems works fine.

@alyssais
Copy link
Member

alyssais commented Jan 1, 2020 via email

@andersk
Copy link
Contributor Author

andersk commented Jan 1, 2020

Hmm. I thought it did, but my test must have been wrong. I tested vagrant.override { ruby = ruby_2_7; } on top of this patch, which works, but without this patch, it still fails in the same way. So Ruby 2.6 must have been leaking in to my test somewhere.

@andersk
Copy link
Contributor Author

andersk commented Jan 1, 2020

I discovered an alternative fix on the Vagrant side only: #76765. I have no idea why it works, though.

@andersk andersk closed this Jan 1, 2020
@andersk andersk deleted the rubygems-ruby-conflict branch December 26, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vagrant broken by rubygems 3.1.2 upgrade: uninitialized constant I18n::Config (NameError)

2 participants