Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 - Vagrant 2.2.14 - HostsUpdater.rb:152:in `+': no implicit conversion of nil into String #192

Open
rogerpfaff opened this issue Dec 11, 2020 · 2 comments
Labels

Comments

@rogerpfaff
Copy link

As in #190 when using Vagrant 2.2.14 throws an error about the conversion of nil to String. It works with vagrant 2.2.10, no info about the inbetween versions at this time.

@theodore86
Copy link

theodore86 commented Dec 12, 2020

Same as in Windows 10

It happens at vagrant==2.2.14, at version vagrant 2.2.13 plugin does not work as expected (hostname entry is not populated in C:\Windows\System32\drivers\etc\hosts), at 2.2.10 works great indeed.

$ vagrant up
Installing the 'vagrant-hostsupdater --version '>= 1.2.0'' plugin. This can take a few minutes...
Installed the plugin 'vagrant-hostsupdater (1.2.0)'!
Bringing machine 'TestVM' up with 'virtualbox' provider...
==> TestVM: [vagrant-hostsupdater] Checking for host entries
==> TestVM: [vagrant-hostsupdater] Writing the following entries to (C:/WINDOWS/system32/drivers/etc/hosts)
==> TestVM: [vagrant-hostsupdater]   172.16.0.2  TestVM  # VAGRANT: d41d8cd98f00b204e9800998ecf8427e (TestVM) /
C:/Users/georgoma/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in `+': no implicit conversion of nil into String (TypeError)
        from C:/Users/georgoma/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in `addToHosts'
        from C:/Users/georgoma/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:99:in `addHostEntries'
        from C:/Users/georgoma/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in `call'

Update:

Using the v1.2.1 beta version fixes this issue

Tested on:

Windows 10
vagrant version 2.2.14
Virtualbox 6.1
vagrant-hostsupdater 1.2.1 - beta version

@rogerpfaff
Copy link
Author

I can confirm the beta version working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants