Skip to content
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

Unable to install on Windows #23

Open
kichik opened this issue Aug 5, 2016 · 10 comments
Open

Unable to install on Windows #23

kichik opened this issue Aug 5, 2016 · 10 comments

Comments

@kichik
Copy link

kichik commented Aug 5, 2016

I have tried install the latest version on Windows 10 with Vagrant 1.8.5 and kept getting an error. Manually trying to install the gem shows the ruby_dep dependency requires Ruby 2.2.5 and above, but Vagrant comes bundled with Ruby 2.2.3. I have tried installing every version of vagrant-unison2 between 1.0.0 and 1.2.4 with no success.

ruby_dep 1.4.0 came out 2 days ago, so it might be related.

The full error message:

C:\>vagrant plugin install vagrant-unison2
Installing the 'vagrant-unison2' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing ruby_dep (1.4.0), and Bundler cannot continue.
Make sure that `gem install ruby_dep -v '1.4.0'` succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::InstallError: ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.

Manual installation error:

C:\>\HashiCorp\Vagrant\embedded\bin\gem.bat install ruby_dep -v 1.4.0
Fetching: ruby_dep-1.4.0.gem (100%)
ERROR:  Error installing ruby_dep:
        ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.

C:\>\HashiCorp\Vagrant\embedded\bin\ruby.exe -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
@kichik
Copy link
Author

kichik commented Aug 5, 2016

I was able to work around the issue by manually installing ruby_dep first with:

vagrant plugin install ruby_dep --plugin-version 1.3.1
vagrant plugin install vagrant-unison2

@JCook21
Copy link

JCook21 commented Aug 11, 2016

I'm also having this problem on OSX and can confirm that the same fix works.

@dcosson
Copy link
Owner

dcosson commented Aug 11, 2016

Are you running Ruby < 2.2.5 when you get this error? (Looks like the default OSX ruby on El Capitan is 2.0.0)

@JCook21
Copy link

JCook21 commented Aug 11, 2016

I'm using RVM and the output of ruby -v is 2.3.1. Maybe the plugin install is defaulting to the system Ruby - let me check to make sure the Ruby versions are correct.

@JCook21
Copy link

JCook21 commented Aug 11, 2016

That was the problem - rvm was using 2.2.0. After installing 2.3.1 and setting it as the default all is good, thanks!

@dcosson
Copy link
Owner

dcosson commented Aug 11, 2016

👍 I'm going to close this, but lmk if the windows version is a different bug.

@dcosson dcosson closed this as completed Aug 11, 2016
@kichik
Copy link
Author

kichik commented Aug 11, 2016

I am unaware of an easy way to upgrade the bundled version of Ruby for Vagrant. Maybe vagrant-unison2 can directly require ruby_dep with a version supported by Vagrant 1.8.5 on Windows?

@JCook21
Copy link

JCook21 commented Aug 11, 2016

@kichik the problem disappeared for me when I upgraded the version of Ruby my shell uses, not the bundled Vagrant one. Maybe that would help? I was using Ruby 2.2.0 installed with RVM. As soon as I installed 2.3.1 and set it as the default Ruby the problem went away. I'm on OSX though so not sure how this would work on Windows.

@kousun12
Copy link

kousun12 commented Sep 7, 2016

@dcosson also getting this on OS X, using rbenv w/ ruby 2.2.4 vagrant 1.8.5

@dcosson dcosson reopened this Sep 8, 2016
@dcosson
Copy link
Owner

dcosson commented Sep 8, 2016

I'm seeing this on OSX too once I updated to vagrant 1.8.5.

It looks like this PR is related hashicorp/vagrant#7684 so hopefully vagrant 1.8.6 will fix this issue.

Until then a workaround is using an older vagrant or a newer ruby version, or installing vagrant unison from source by cloning this repo, running bundle install && bundle exec rake build and then vagrant plugin install pkg/vagrant-unison2-2.0.0.gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants