drmckay-
drmckay-

Reputation: 215

Vagrant Windows-1251 encoding error

I got the next error with vagrant when trying to use "vagrant up" command:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise32'...
C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.3/lib/childprocess/wind
ows/process_builder.rb:43:in `join': incompatible character encodings: Windows-1
251 and UTF-8 (Encoding::CompatibilityError)

I have Windows 8.1, and I used "chcp 1251" command before, because it was the same error with "ibm866" encoding.

Thanks!

Upvotes: 6

Views: 14117

Answers (5)

den_ban
den_ban

Reputation: 79

If you stil having some trouble with it, even after seting env variable, try just to move your "homestead" folder to a path that not contains any cyrilic symbols. Or you can create another user in you system without cyrilc Hope it helps!

Upvotes: 0

Gulzada Serzhan
Gulzada Serzhan

Reputation: 67

  1. Set an environtment variable VAGRANT_HOME to the path, for example 'c:\HashiCorp'

  2. Then add to c:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.3\bin\vagrant after #!/usr/bin/env ruby these two lines:

Encoding.default_external = Encoding.find('Windows-1251')

Encoding.default_internal = Encoding.find('Windows-1251')

Notice Windows-1251, not Windows-1250.

And I think you might need to reboot to enable the environment variable.

Upvotes: 6

Dexpo
Dexpo

Reputation: 91

the solution for me was this one .

You have to go to : c:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.3\bin\vagrant

And edit the vagrant (file) and put after this : #!/usr/bin/env ruby

this 2 lines

Encoding.default_external = Encoding.find('Windows-1250')
Encoding.default_internal = Encoding.find('Windows-1250')

Good luck!

Upvotes: 8

IronBlood
IronBlood

Reputation: 175

Yes, setting environment variable VAGRANT_HOME can solve the problem.

I think it's mainly because vagrant up command would try to visit %userprofile%\.vagrant.d folder, however, your %userprofile% is named in Windows 1251 encoding. Setting VAGRANT_HOME can point to a path recognizable for vagrant's ruby script.

Upvotes: 0

drmckay-
drmckay-

Reputation: 215

Problem was solved by setting environment variable VAGRANT_HOME

Upvotes: 9

Related Questions