モーグルとカバとパウダーの日記

モーグルやカバ(EXカービング)山スキー(BC)などがメインの日記でした。今は仕事のコンピュータ系のネタが主になっています。以前はスパム対策関連が多かったのですが最近はディープラーニング関連が多めです。

「vagrant plugin install vagrant-vbguest」がWindowsで動かない

Vagrantに、Guest Additionsを自動更新してくれるvagrant-vbguestというプラグインがあるのですが、これをWindowsVagrantに入れようとするとうまくいかなかったのでメモ。

> vagrant plugin install vagrant-vbguest

でインストールできると書いてあるのですが、Windows環境でこれやっても

Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

とか言われてしまいうまく入りませんでした。


dotless-de/vagrant-vbguest
https://github.com/dotless-de/vagrant-vbguest


ここのvagrant-vbguestのページを見てもあまり書いてないのですが、最後の最後に

The plugin installation on Windows host systems my not work as expected (using vagrant gem install vagrant-vbguest). Try C:\vagrant\vagrant\embedded\bin\gem.bat install vagrant-vbguest instead. (See issue #19)

とあって、gem.batから入れると入るんだそうです。


自分の環境ではコマンドプロンプトから

"c:\Program Files (x86)\Vagrant\embedded\bin\gem" install vagrant-vbguest

みたいな感じで無事に入れることが出来ました。