Parallels / vagrant-parallels

Vagrant Parallels Provider
https://parallels.github.io/vagrant-parallels
MIT License
996 stars 87 forks source link

Can't install vagrant-parallels despite latest Vagrant and Ruby #412

Closed polarbirke closed 2 years ago

polarbirke commented 2 years ago

I'm failing to install vagrant-parallels via vagrant plugin install vagrant-parallels although I'm on the latest vagrant version (2.2.19). Vagrant is already using the embedded Ruby version (from /opt/vagrant/embedded/bin/ruby) 2.7.4 and not the default MacOS Big Sur version (which is 2.6.3 in my case):

% vagrant plugin install vagrant-parallels
Installing the 'vagrant-parallels' plugin. This can take a few minutes...
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

io-event requires Ruby version >= 3.0. The current ruby version is 2.7.4.191.

This issue also exists with the vagrant-dns plugin.

The following work-around worked for me:

git clone git@github.com:Parallels/vagrant-parallels.git
cd vagrant-parallels
bundle install
rake build
cd ../path/to/vagrant/
vagrant plugin install ../path/to/vagrant-parallels/pkg/vagrant-parallels-2.2.4.gem
fnordfish commented 2 years ago

It's a vagrant issue where it does not correctly resolve plugin dependencies, see hashicorp/vagrant#12640

polarbirke commented 2 years ago

It's a vagrant issue where it does not correctly resolve plugin dependencies, see hashicorp/vagrant#12640

Thank you for opening that issue, @fnordfish! I wanted to leave a (second) trail here for other people with plugin install problems.

I found it curious that I could install vagrant-parallels via your work-around (building it locally) even without your fixes (explicitly allowing Ruby < 3), but haven't looked deeper.

fnordfish commented 2 years ago

@polarbirke Looking at this projects gemspec, I believe you get this error because you are using vagrant-dns. vagrant-parallels does not seem to have any connection to io-event. It's (another) common issue, when installing a plugin in vagrant, it might stumble about an issue in another plugin. That's because all plugins need to coexist in the same ruby environment, sharing the same dependencies. So my guess is, when installing vagrant-parallels, vagrant tries to re-build it's dependencies and stumbles about vagrant-dns

polarbirke commented 2 years ago

Oh, interesting! Thanks for the explainer!

mpdude commented 2 years ago

@fnordfish thank you for your support here and for resolving the vagrant-dns issue so quickly ✨

legal90 commented 2 years ago

Thank you for the information, @fnordfish !

I'm gonna close this issue since it's not related to vagrant-parallels project. To those who run into it: please refer to the upstream Vagrant issue mentioned above, https://github.com/hashicorp/vagrant/issues/12640