title: Can't convert symbol to integer from hash table
body: <p>Edit:  The issue is being unable to get the quantity of arrays within the hash, so it can be, x = amount of arrays.  so it can be used as function.each_index{|x| code }</p>
  
  <p>Trying to use the index of the amount of rows as a way of repeating an action X amount of times depending on how much data is pulled from a CSV file.</p>
  
  <p>Terminal issued </p>
  
  <pre><code>=&gt; Can't convert symbol to integer (TypeError)
  </code></pre>
  
  <p>Complete error:</p>
  
  <pre><code>=&gt; ~/home/tests/Product.rb:30:in '[]' can't convert symbol into integer (TypeError) from ~home/tests/Product.rub:30:in 'getNumbRel'
  from test.rb:36:in '&lt;main&gt;'
  </code></pre>
  
  <p>the function is that is performing the action is:</p>
  
  <pre><code>def getNumRel
    if defined? @releaseHashTable
       return @releaseHashTable[:releasename].length
    else
        @releaseHashTable = readReleaseCSV()
        return @releaseHashTable[:releasename].length
    end
  end
  </code></pre>
  
  <p>The csv data pull is just a hash of arrays, nothing snazzy. </p>
  
  <pre><code>def readReleaseCSV()
     $log.info("Method "+"#{self.class.name}"+"."+"#{__method__}"+" has started")
     $log.debug("reading product csv file")
     # Create a Hash where the default is an empty Array
     result = Array.new
     csvPath = "#{File.dirname(__FILE__)}"+"/../../data/addingProdRelProjIterTestSuite/releaseCSVdata.csv"
     CSV.foreach(csvPath, :headers =&gt; true, :header_converters =&gt; :symbol) do |row|
       row.each do |column, value|
         if "#{column}" == "prodid"
           proHash = Hash.new { |h, k| h[k] = [ ] }
           proHash['relid'] &lt;&lt; row[:relid]
           proHash['releasename'] &lt;&lt; row[:releasename]
           proHash['inheritcomponents'] &lt;&lt; row[:inheritcomponents]
  
           productId = Integer(value)
           if result[productId] == nil
              result[productId] = Array.new
           end
  
           result[productId][result[productId].length] = proHash
        end
      end
    end
    $log.info("Method "+"#{self.class.name}"+"."+"#{__method__}"+" has finished")
    @productReleaseArr = result
   end
  </code></pre>