4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vagrant -v や vagrant up 実行時に executable file not foundが発生する事象の解決法

Posted at

vagrant -v や vagrant up 実行時に executable file not foundが発生する事象の解決法

この問題を確認しているのは、

  • Windows 10
  • Vagrant 2.0.4
  • avast 18.3
    の環境で確認しております。

以下のコマンド実行例のように、vagrant -vvagrant up実行時に、ruby.exeが環境変数%PATH%に見つからないよ。というエラーが発生することがあります。

C:\vbox\redmine>vagrant -v
Exec error: exec: "ruby": executable file not found in %PATH%

C:\vbox\redmine>vagrant up
Exec error: exec: "ruby": executable file not found in %PATH%

この原因として、avastのウィルスソフトによって、ruby.exeが除去されてしまうために発生している可能性があります。
ruby.exeは、デフォルトインストール状態の場合、通常は以下にインストールされています。
C:\HashiCorp\Vagrant\embedded\mingw64\bin

このフォルダを確認するとruby.exeが確かに見当たらず、rubiw.exeなどがあるのみとなっています。

対処方法

avastのウィルスソフト設定による除外設定

avastのウィルスチェックにより、除去されないよう、当該フォルダを、以下avastの参考サイトに従って特定フォルダの除外設定をすることで対応する。
https://support.avast.com/ja-jp/article/168/

Vagrantの再インストール

除外設定が完了したら、Vagrantを一度アンインストールし、OSを再起動したあとにVagrantを再インストールする。
再インストール後、vagrant upコマンドなどの挙動を確認し、当該エラーが発生しないことが確認できればOKです。

4
0
4

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
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?