“Exec error: exec: “ruby”: executable file not found in %PATH%”

## Vagrant version

2.1.1

## Host operating system

Windows 10

I am having a strange issue where vagrant works fine for a while, and then all of a sudden it completely stops working and any vagrantcommands I run, just give me: "Exec error: exec: "ruby": executable file not found in %PATH%"

It happened yesterday and after a restart didn't fix it, I uninstalled/reinstalled it and it started working again.

Today I've cmoe back to it and again it was working fine, I created a box, went in and did some stuff on it then destroyed it, then created another one, and all was working fine. Then I did a vagrant upon the new box i initialised... I got a lot of warnings, but it got there in the end:

default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: Warning: Connection reset. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: No guest additions were detected on the base box for this VM! Guest default: additions are required for forwarded ports, shared folders, host only default: networking, and more. If SSH fails on this machine, please install default: the guest additions and repackage the box to continue. default: default: This is not an error message; everything may continue to work properly, default: in which case you may ignore this message. ==> default: Configuring and enabling network interfaces... default: SSH address: 127.0.0.1:2200 default: SSH username: vagrant default: SSH auth method: private key ==> default: Rsyncing folder: /cygdrive/m/Web/moodle/ => /vagrant

But now any vagrantcommand, inlcuding just vagrantitself, and all I get is:

"Exec error: exec: "ruby": executable file not found in %PATH%"

Nothing has changed on my PC from the time I ran vagrant uptill now.

Can anyone help please?

Thanks.

[https://github.com/hashicorp/vagrant/issues/9874](https://github.com/hashicorp/vagrant/issues/9874)

1 thought on ““Exec error: exec: “ruby”: executable file not found in %PATH%””

Leave a Comment