add file encoding to solve problem:
Ruby Regex Error: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)