Ruby: undefined method `[]’ for nil:NilClass when trying to get Enumerator on an Array of Hashes
undefined method `[]’ for nil:NilClass says you tried to do something[index] but something is nil. Ruby won’t let you use nil as an array (ie. call the [] method on it). The problem is not on the attributs.each line but on the line following which calls the [] method on attribut. This indicates something in … Read more