in `+': no implicit conversion of nil into String (TypeError)

1.1k views Asked by At

I am installing VVV and stuck while executing "vagrant up" command. It is showing me following error:

C:/Users/Admin/.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)

When I opened the ruby file,

elsif Vagrant::Util::Platform.windows?
          require 'tmpdir'
          uuid = @machine.id || @machine.config.hostsupdater.id
          tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd')
          File.open(tmpPath, "w") do |tmpFile|
          entries.each { |line| tmpFile.puts(">>\"#{@@hosts_path}\" echo #{line}") }
          end
          sudo(tmpPath)
          File.delete(tmpPath)

"tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd')" is the line which is giving me error.

I am trying to install VVV through a Youtube video, followed the exact steps given in the video, then how come that video isn't facing this error and I do.

0

There are 0 answers