Check Ruby Document here.
Generally speaking, #parse is used to parse a string while #foreach is for a file. 
solved CSV difference between foreach and parse methods [closed]
 
Check Ruby Document here.
Generally speaking, #parse is used to parse a string while #foreach is for a file. 
solved CSV difference between foreach and parse methods [closed]