On Ruby 2.4.2, I get lots (really lots) of warnings about Fixnum being deprecated. According to this and this issue, this seems to fixed for Nokogiri 1.7.0 and above. So you may want to consider bumping up the Nokogiri version a notch (if it does not break anything).
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
Bringing machine 'default' up with 'libvirt' provider...
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
==> default: Starting domain.
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
Warning: Permanently added '192.168.230.243' (ECDSA) to the list of known hosts.
==> default: Creating shared folders metadata...
/home/auser/.vagrant.d/gems/2.4.2/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/document.rb:44: warning: constant ::Fixnum is deprecated
==> default: Rsyncing folder: /home/auser/vagrant/test7/ => /vagrant
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
Note: I tried a quick fix myself. I cloned the repository and changed the Nokogiri version in
vagrant-libvirt.gemspec to -> 1.7.0, built a gem with gem build
vagrant-libvirt.gemspec and loaded this gem into vagrant from a local gem server (vagrant
plugin install vagrant-libvirt --plugin-source http://localhost:8808). For
some reasons, even this so created version seems to use Nokogiri 1.6.8.1. Obviously, I have missed something.
How did you do that? Where do you edit that file?
Related: #769
@JJ It appears these annoying errors are suppressed on my setup with the invocation of the following environment setting (ruby option): export RUBYOPT="-W0"
See: warning: constant ::Fixnum is deprecated When generating new model (Stack Overflow)
The lots of warnings were very annoying for me too. Very new to vagrant, investigating its use and already familiar with kvm/qemu/libvirt setup so wanted to use libvirt provider. Installed vagrant 2.0.1. As mentioned in #769, seems vagrant is based on ruby 2.4.2 and nokogiri used in the plugin is 1.6.8 that produces these warnings.
Seems I fixed it like
kzorba@enigma-home ~/tmp-> git clone https://github.com/vagrant-libvirt/vagrant-libvirt
kzorba@enigma-home ~/tmp-> cd vagrant-libvirt/
kzorba@enigma-home ~/tmp/vagrant-libvirt (master)->
kzorba@enigma-home ~/tmp/vagrant-libvirt (master)-> git diff vagrant-libvirt.gemspec
diff --git a/vagrant-libvirt.gemspec b/vagrant-libvirt.gemspec
index f8fe7b5..a0b02b8 100644
--- a/vagrant-libvirt.gemspec
+++ b/vagrant-libvirt.gemspec
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "rspec-mocks", "~> 3.5.0"
gem.add_runtime_dependency 'fog-libvirt', '>= 0.3.0'
- gem.add_runtime_dependency 'nokogiri', '~> 1.6.0'
+ gem.add_runtime_dependency 'nokogiri', '~> 1.6'
gem.add_runtime_dependency 'fog-core', '~> 1.43.0'
gem.add_development_dependency 'rake'
kzorba@enigma-home ~/tmp/vagrant-libvirt (master)-> /opt/vagrant/embedded/bin/gem build vagrant-libvirt.gemspec
kzorba@enigma-home ~-> vagrant plugin install ~/tmp/vagrant-libvirt/vagrant-libvirt-0.0.40.gem
This procedure brings nokogiri-1.8.1 in the plugin and eliminates the warnings :)
Fixed by #769
Most helpful comment
The lots of warnings were very annoying for me too. Very new to vagrant, investigating its use and already familiar with kvm/qemu/libvirt setup so wanted to use libvirt provider. Installed vagrant 2.0.1. As mentioned in #769, seems vagrant is based on ruby 2.4.2 and nokogiri used in the plugin is 1.6.8 that produces these warnings.
Seems I fixed it like
This procedure brings nokogiri-1.8.1 in the plugin and eliminates the warnings :)