NoMethodError: undefined method << for {}:Hash