LoginSignup
13
14

More than 5 years have passed since last update.

VagrantコマンドでEncoding::InvalidByteSequenceError

Posted at

※2016年11月に、別のブログで書いた記事を移行したものです。


vagrant up, vagrant halt, vagrant sshなどで、たびたび C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/util/io.rb:32:in `encode': incomplete "\x98" on Windows-31J (Encoding::InvalidByteSequenceError) が起きました。

C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/util/ にある、io.rb の32行目を

data << io.readpartial(READ_CHUNK_SIZE).encode("UTF-8", Encoding.default_external)

以下のように変更

data << io.readpartial(READ_CHUNK_SIZE).encode("Windows-31J", Encoding.default_external)

これで直ります。

13
14
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
14