Fixing Ruby on Rails CSV Import Error Encoding::UndefinedConversionError: “\xC3” from ASCII-8BIT to UTF-8

Recently I had to import a csv for a Rails project
CSV.parse(File.open( path, 'rb'),{:headers=>true}) do |row|

And got the error
Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8

Basically the csv had some French in it. To fix it, you can pass this encoding
CSV.parse(File.open( path, 'r:iso-8859-1:utf-8'),{:headers => true}) do |row|