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

vagrant plugin install not working on latest vagrant 2.3.7 #13261

Closed
ahasunos opened this issue Sep 11, 2023 · 3 comments · Fixed by #13336
Closed

vagrant plugin install not working on latest vagrant 2.3.7 #13261

ahasunos opened this issue Sep 11, 2023 · 3 comments · Fixed by #13336
Labels

Comments

@ahasunos
Copy link

Debug output

Please expand to see the debug log

 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x000000015e4640b0>
/opt/vagrant/embedded/lib/ruby/3.1.0/rubygems/specification.rb:2278:in `check_version_conflict': can't activate json-2.6.3, already activated json-2.6.1 (Gem::LoadError)
	from /opt/vagrant/embedded/lib/ruby/3.1.0/rubygems/specification.rb:1415:in `activate'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/bundler.rb:756:in `block in activate_solution'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/bundler.rb:753:in `each'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/bundler.rb:753:in `activate_solution'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/bundler.rb:593:in `internal_install'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/bundler.rb:355:in `install'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/plugin/manager.rb:138:in `block in install_plugin'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/plugin/manager.rb:148:in `install_plugin'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/action/install_gem.rb:30:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/action/warden.rb:48:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/action/builder.rb:180:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/action/runner.rb:101:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/action/runner.rb:101:in `run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/command/base.rb:14:in `action'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/command/install.rb:70:in `block in execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/command/install.rb:69:in `each'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/command/install.rb:69:in `execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/commands/plugin/command/root.rb:66:in `execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/cli.rb:67:in `execute'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/environment.rb:301:in `cli'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/bin/vagrant:248:in `<main>'

Expected behavior

It should be able to install plugin

Actual behavior

Crashing with issue of can't activate json-2.6.3, already activated json-2.6.1 (Gem::LoadError)

Reproduction information

Vagrant version

2.3.7

Host operating system

MacOS Ventura 13.5

Guest operating system

Steps to reproduce

  1. Install vagrant 2.3.7 from https://developer.hashicorp.com/vagrant/downloads
  2. Install plugin: vagrant plugin install vagrant-aws --debug

NOTE: The same works correctly for vagrant version 2.3.4

Please feel free to close the issue if:

  • it is fixed
  • it is being addressed already
@nloveupgrade
Copy link

nloveupgrade commented Sep 15, 2023

I had this issue as well. I'm running an M1 mac (arm64) and it looks like the issue started (as far as I can tell) on the first version Hashicorp started publishing arm64 versions of vagrant: 2.3.5.

A work around until they fix it is to:

  1. Move them json 2.6.1 gemspec file so it's no long used
mv /opt/vagrant/embedded/lib/ruby/gems/3.1.0/specifications/default/json-2.6.1.gemspec /opt/vagrant/embedded/lib/ruby/gems/3.1.0/specifications/default/json-2.6.1.gemspec.bak
  1. In the file /opt/vagrant/embedded/lib/ruby/3.1.0/json/version.rb change VERSION = '2.6.1' to `VERSION = '2.6.3'

After those steps you should be able to run vagrant plugin install vagrant-aws

@stephenthedev
Copy link

2. /opt/vagrant/embedded/lib/ruby/3.1.0/json/version.rb

this also worked for a fresh ubuntu install on wsl2 :-)

@xeacott
Copy link

xeacott commented Jan 16, 2024

THIS DID THE TRICK!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants