1

I installed vagrant 1.3.4 on my Windows 7 laptop then tried to type vagrant init from command line. It failed with below error. I tried other commands (even vagrant --help) but still receive a same error. I tried googling for a while to no avail. Is there anyone who can shed light on why this error happens? Any input is appreciated. Thanks

C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:268:in `[]': code converter not found (
UTF-16LE to Windows-1258) (Encoding::ConverterNotFoundError)
    from    C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:268:in `block in _all'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:267:in `each'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:267:in `_all'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `find_all'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `matching_specs'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:238:in `to_specs'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    from C:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:22:in `<main>'
Thang Mai
  • 314
  • 3
  • 10

2 Answers2

0

After searching for a while, this seems to be an issue with Ruby and I found the answer from this here:

Error installing Rubygems on ruby command prompt in Win7

I did the same, changing my locale from Vietnam to US and issue resolved.

Community
  • 1
  • 1
Thang Mai
  • 314
  • 3
  • 10
0

You can add chcp 65001 > nul at the top of vagrant.bat after @ECHO OFF

Mikhail
  • 1
  • 2