Re: [vagrant-up] vagrant on windows with cygwin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [vagrant-up] vagrant on windows with cygwin

Radu Micu
Thank you Shawn,

This did the trick for me.

On Wednesday, January 9, 2013 1:38:53 AM UTC+2, Shawn Grunberger wrote:
I encountered the same problem. It appears to be a bug in the bash script: the GEM_HOME and GEM_PATH paths aren't being converted from cygwin to DOS-style paths, so the embedded (non-cygwin) ruby can't find the vagrant gem. Adding the following two lines to c:\vagrant\vagrant\bin\vagrant fixes the issue:

*** 47,52 ****
--- 47,54 ----
  OS=$(uname -o 2> /dev/null)
  if [ "${OS}" = "Cygwin" ]; then
+     GEM_HOME=`cygpath -w ${GEM_HOME}`
+     GEM_PATH=`cygpath -w ${GEM_PATH}`

I've entered a bug:

On Monday, December 31, 2012 7:07:20 AM UTC-8, Tim Houseman wrote:
Hello all, I'm rather new to Vagrant, but I'm trying to get it up and running on windows. It runs when I use cmd.exe to do it, but when I try to run it through cygwin I get the following error(s)
"C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find vagrant (>= 0) amongst [] (Gem::LoadError)
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
        from C:/vagrant/vagrant/embedded/gems/bin/vagrant:22:in `<main>'

Any suggestions?