Close string in script/rails