title: Debug the script
body: <p>I need guidance to resolve a error while running a Ruby script, there is a module which is producing an error. The error error message is below:</p>
  <blockquote>
  <p>./7toEIS_v2.rb:304:in `+': no implicit conversion of nil into String (TypeError)</p>
  </blockquote>
  <p>The erroring function is below:</p>
  <pre><code>300 def showContOwner(cont_name)
  301     File.open($physcontinfo).each_line { |i|
  302         i.chomp!
  303         cont,blah,model,ontap,loc,owner = i.split(&quot;,&quot;)
  304         ($phys[cont] ||=[] &lt;&lt; model + &quot;,&quot; + ontap + &quot;,&quot; + loc + &quot;,&quot; + owner)
  305     }
  306     return cont_name + &quot; - to be executed by &quot; + $phys[cont_name][0].split(&quot;,&quot;)[3]
  307 end
  </code></pre>
  <p>I have checked by changing the code that it reads the file though.</p>
  <p>Also this code was written for earlier version of Ruby, and currently I am using the version below:</p>
  <blockquote>
  <p>ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin15</p>
  </blockquote>