vagrant,在启动虚拟机的时候报错io.rb:32:in `encode': incomplete "\xC8" on GBK (Encoding::Invalid
作者:互联网
描述:
这几天在windows环境上,部署了vagrant,在启动虚拟机的时候报错:
解决过程:
找了好久,都没有说明白,后来在国外的github上看到了解决的方案。
参考地址:https://github.com/hashicorp/vagrant/issues/9368
参考内容:
My Solution With the help of a non vagrant-related StackOverflow solution, I solved the issue by changing the line 32 in "Vagrant\embedded\gems\gems\vagrant-2.0.1\lib\vagrant\util" as: data << io.readpartial(READ_CHUNK_SIZE).encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')
即修改源代码,说改就改:
#data << io.readpartial(READ_CHUNK_SIZE).encode("UTF-8", Encoding.default_external) data << io.readpartial(READ_CHUNK_SIZE).encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')
修改之后,重新执行命令vagrant up
标签:gems,github,虚拟机,vagrant,报错,rb,data 来源: https://www.cnblogs.com/SmallStrange/p/14154367.html