On my Windows 7 Ultimate laptop, I had Vagrant, and a couple of development environments working just fine... This wa sabout a week ago, and then either virtualbox or Git released an updated version... Then things seemed off, so I decided to uninstall everything (virtualbox, Vagrant, Git, and everything in between I could think of) and reinstall.
However, for a week now I have not been able to run Vagrant... not bring up a box.... or do a vagrant init.... BUT ANY VAGRANT COMMAND.
I have uninstalled Vagrant thoroughly... just short of reinstalling Windows! Then I reboot, and reinstall. Then I reboot.
I check my path... I have heard a number of different things that need to be in the WINDOWS Environment PATH, and some may be obsolete, but these are the Vagrant related items in my path:
C:\HashiCorp\Vagrant\embedded\bin;
C:\HashiCorp\Vagrant\embedded\gems\bin;
C:\HashiCorp\Vagrant\bin;
C:\HashiCorp\Vagrant\embedded\mingw\bin;
Also, before anyone asks, when installing vbox (which I do first), I have downloaded the last version (4.3.22-09236). There is a newer release as of a few days ago, but I am trying keep constants alive. I also install the correct guest extensions.
The following item is in my Windows Environment PATH:
C:\Program Files\Oracle\VirtualBox;
when I open a windows command prompt as admin, i run vboxmanage and I get the correct response. After reboot (after Vagrant install), I type:
vagrant -version (or vagrant --version...not sure which is the correct command). But the right command (the one that should return the current version of Vagrant gives the following error:
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'vagrant' (>= 0) among 8 total gem(s) (Gem::LoadError)
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from C:/HashiCorp/Vagrant/embedded/gems/bin/vagrant:22:in `<main>'
What is strange about this is that rubygems is looking for Vagrant. But right in the documentation at the Vagrant site, it states that Vagrant at one time was a gem file. Now it is not installed as a gem file unless you wish to create a development environment for a vagrant plugin.
So why is it looking for vagrant as a gem file????? I have searched for days on Google and I see that there is some similar problem with Chef. But I am not even at the point where I can start using a provisioner.
Anyone have ANY idea what is happening?
NB: One added piece of information.... I am sure all of you know that in the last year or so, you are able to use ssh right from Git Bash, so instead of installing CYGWIN or use PuTTY for ssh, I just install (and only install) the Git Bash part of the Git for Windows binaries at git-scm.com
In fact, this is why I have the line "C:\HashiCorp\Vagrant\embedded\mingw\bin;" in my windows PATH. I saw it on Stack Overflow... it was some helpful tip to get Git to work with Vagrant..... but I am starting to suspect that since GIt is written in Rails with Ruby that maybe this is the problem. Git is ok, but maybe that line in the Windows PATH should not be there. Previously I used Git (a week ago) and everything worked fine. I could go into Git Bash navigate to my synced folder or clone a box to a folder in a specific directory. Most people use Windows command line for perhaps running vagrant up or vagrant init... But before, I was doing everything in Git Bash. With that said... if I launch Git Bash and run Vagrant -version, this is my error:
sh.exe": /c/HashiCorp/Vagrant/embedded/gems/bin/vagrant: C:/Users/Administrator/12c3yemv.nal/embedded/bin/ruby.exe: bad interpreter: No such file or directory
And I have been around enough to know that this shell command attempt by GIt Bash is having issues with CRLF.... Maybe Git Bash just uses CR, but since we are in windows, and Vagrant is designed to be installed in WIndows (with the appropriate installer), it has all of its scripts or text files with EOLs of CRLF. When I go into the "sh.exe" file in Git, the first line is commented out... and that line is C:/Users/Administrator/12c3yemv.nal/embedded/bin/ruby.exe —tjos is the line above that is Git is trying to execute... This is why I am getting the "bad interpreter" and the "no such file or directory"... because of the EOL encoding. WTF??
Anyway... I am about a week behind in having some development environments setup and am starting to twitch with frustration.
Can anyone offer any ideas???