1
votes

I need vagrant for my work project. Everybody in our team using version 1.0.7, which is the latest version of vagrant that was using ruby gems way of installing. All the later versions use regular .deb install(we are using ubuntu). For unknown reason every time i am trying to install vagrant using ruby gems or manually(also 1.0.7 version) i get the same message:

Thanks for wanting to use Vagrant! Unfortunately, this is not the way to install Vagrant anymore. We now make installers for the various operating systems Vagrant supports. Vagrant is no longer distributed as a RubyGem. Please download the latest version for your operating system from the URL below. If you still wish to use the RubyGem version, you can manually install version 1.0.7. Note that the RubyGem version hasn't been updated in over a year and will no longer receive any updates. Prior to installing Vagrant using the installer, make sure you uninstall all your Vagrant gems, since they sometimes conflict. http://www.vagrantup.com If you want to learn more about why we don't distribute using RubyGems anymore, please read this: http://mitchellh.com/abandoning-rubygems

And now by trying any command i get this message every time time. I have tried to uninstall and to install manually or using ruby gems multiply times and no luck. Any ideas?

2
As an historical note: many years ago Vagrant was available as a Gem. This stopped being used as of March 2013.. Vagrant should now be installed as a package.notapatch

2 Answers

2
votes

You can install a specific gem version with the -v / --version option:

gem install vagrant --version 1.0.7

You can also download the gem manually from rubygems and install it with gem install path/to/vagrant-*.gem.

But you should really try to get all the team to upgrade to new Vagrant versions. There are lots of new features and bug fixes.

2
votes

I was having the same problem and solved it doing the following:

Vagrant is not distributed via gems anymore, and as we can read in the message:

"[...]Prior to installing Vagrant using the installer, make sure you uninstall all your Vagrant gems[...]".

So that's what I did. I ran in the console (using Windows):

C:\My Folder>gem list

*** LOCAL GEMS ***

bigdecimal (1.2.7, 1.2.0)
io-console (0.4.2)
json (1.8.2, 1.7.7)
minitest (5.5.1, 4.3.2)
power_assert (0.2.2)
psych (2.0.12, 2.0.0)
rake (10.4.2, 0.9.6)
rdoc (4.2.0, 4.0.0)
sass (3.4.11)
test-unit (3.0.9, 2.0.0.0)
vagrant (1.5.0)

You can see that I still had a vagrant gem installed, and the message said, Vagrant gems are not used for Vagrant anymore.

So I did:

C:\My Folder>gem uninstall vagrant
Remove executables:
        vagrant

in addition to the gem? [Yn]  Y
Removing vagrant
Successfully uninstalled vagrant-1.5.0

C:\My Folder>gem list

*** LOCAL GEMS ***

bigdecimal (1.2.7, 1.2.0)
io-console (0.4.2)
json (1.8.2, 1.7.7)
minitest (5.5.1, 4.3.2)
power_assert (0.2.2)
psych (2.0.12, 2.0.0)
rake (10.4.2, 0.9.6)
rdoc (4.2.0, 4.0.0)
sass (3.4.11)
test-unit (3.0.9, 2.0.0.0)

After this, I reinstalled Vagrant using the Vagrant installer for my Windows machine as the message said, and I was able to run Vagrant successfully.

Good luck!