FS#75849 - [vagrant] Vagrant is not compatible with Ruby 3
Attached to Project:
Community Packages
Opened by Vic (vic) - Thursday, 08 September 2022, 08:41 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 13 September 2022, 21:54 GMT
Opened by Vic (vic) - Thursday, 08 September 2022, 08:41 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 13 September 2022, 21:54 GMT
|
Details
Using a custom network config results in "wrong number of
arguments (given 2, expected 1) (ArgumentError)".
Upstream rolled back their upgrade to Ruby 3.0 because Vagrantfiles are not compatible yet: https://github.com/hashicorp/vagrant/issues/12448 As the Archlinux package does not contain the embedded ruby but instead uses system ruby (3), we're still bitten by this bug. Additional info: * package version(s) 2.3.0-7 * https://github.com/hashicorp/vagrant/issues/12448 |
This task depends upon
Closed by Toolybird (Toolybird)
Tuesday, 13 September 2022, 21:54 GMT
Reason for closing: Not a bug
Additional comments about closing: See comments
Tuesday, 13 September 2022, 21:54 GMT
Reason for closing: Not a bug
Additional comments about closing: See comments
IIUC, you can modify your config to be compatible with ruby3 as mentioned in the linked upstream issue?
[1] https://github.com/hashicorp/vagrant/blob/v2.3.0/vagrant.gemspec#L15
[2] https://www.vagrantup.com/docs/installation/source
[1] https://github.com/test-kitchen/kitchen-vagrant
diff PKGBUILD.official PKGBUILD
13c13
< pkgrel=7
---
> pkgrel=8
20c20
< 'ruby' 'xz' 'perl')
---
> 'ruby2.7' 'xz' 'perl')
31c31
< local _gemdir="$(gem env gemdir)"
---
> local _gemdir="$(gem-2.7 env gemdir)"
39c39
< gem build $pkgname.gemspec
---
> gem-2.7 build $pkgname.gemspec
63c63
< gem install $pkgname-$pkgver.gem \
---
> gem-2.7 install $pkgname-$pkgver.gem \
83d82
<
[1] https://github.com/test-kitchen/kitchen-vagrant/commit/34a3722cad89652168514c749ad35cf088b71651
I don't have that version yet as I'm using the kitchen and kitchen-vagrant included in chef-workstation[1]. However, the issue is fixed for me as I've rebuilt the vagrant package with Ruby 2.7. The fix you've linked may be released by the time a new vagrant version appears.
[1] https://www.chef.io/downloads/tools/workstation?os=ubuntu