You have a hash as a subelement of *node["prestashop_sites"]*, not an array. So you have to provide 2 variables to each method. 1 is for key, another for value:
10>>! node["prestashop_sites"].each do |key, site|
11: Chef::Log.debug("Found a server: name: #{key}, #{site['username']}")
12: end
Will print "Found a server: name: site1, dave" for the first site.
The "strange" error you get: TypeError - can't convert String into Integer, is because when you provide only 1 variable to the each method, ruby tries to put both key and value into that variable. Which ends the value of [key, value] assigned, which in your case means that
site == ["site", { "username": "dave", "password" :"password123", "URL":"www.madeup.com" }]
An array actually, and you try to access an array element with string index and not integer.