BerlinVagrant / vagrant-dns

A plugin to manage DNS records for vagrant environments
MIT License
491 stars 50 forks source link

Install fails with devkit LoadError #71

Open uovo opened 2 years ago

uovo commented 2 years ago

Installation of vagrant-dns fails on a fresh vagrant setup on Windows 10.

vagrant version

Installed Version: 2.2.19 Latest Version: 2.2.19

vagrant plugin install vagrant-dns

Fetching nio4r-2.5.8.gem Vagrant failed to properly resolve required dependencies. These errors can commonly be caused by misconfigured plugin installations or transient network issues. The reported error is:

ERROR: Failed to build gem native extension.

current directory: C:/Users/uwe/.vagrant.d/gems/2.7.4/gems/nio4r-2.5.8/ext/nio4r

C:/HashiCorp/Vagrant/embedded/mingw64/bin/ruby.exe -I C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0 -r ./siteconf20220107-14964-uxuw0.rb extconf.rb ch file -- devkit (LoadError) from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in 'require' from extconf.rb:7:in main

extconf failed, exit code 1

I've also compiled the gem (2.2.0) from the current git tip and get the same error.

fnordfish commented 2 years ago

Sorry, but I don't have a awful lot of experience with Windows. A quick search yielded a lot of old issues with nio4r and Windows, Vagrant on Windows and Rails on Windows. But nothing I can put into perspective, I'm afraid.

Just to maybe safe you some trouble, have you figured out a way to hook the dns Server vagrant-dns starts into Windows?

Please see https://github.com/BerlinVagrant/vagrant-dns/blob/master/PLATFORM_SUPPORT.md The wording in that document is a bit strict. vagrant-dns should be able to run on all major platforms, but it's usability might be reduced due to the reasons described in that doc.

idevorel commented 1 year ago

I have same problem. in windows it very simple , just add line in the file .

ip _ domain

0.0.0.0 www.facebook.com

C:\Windows\System32\drivers\etc\hosts
#or
%WINDIR%\system32\drivers\etc\hosts

https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/


set ip=172.17.106.229

echo %ip% facebook.test >> %WINDIR%\System32\Drivers\Etc\hosts
echo %ip% service.facebook.test >> %WINDIR%\System32\Drivers\Etc\hosts
echo %ip% web.facebook.test >> %WINDIR%\System32\Drivers\Etc\hosts