I am doing: SourceHash = {} File.open("file_to_open").each {|line| SourceHash[var[3]] = {} puts SourceHash['VALUE']['cktid'] }
var is just an array of each csv value.
The error says undefined method for nil:NilClass in 'each'
If I take the hash statement out of the file loop it works. Any ideas why the "each" method is throwing an error while trying to get a value out of a 2 level hash??