Created
June 15, 2011 20:13
-
-
Save ugisozols/1027992 to your computer and use it in GitHub Desktop.
Search Psych::SyntaxError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will help you trace .yml file which containts Psych::SyntaxError | |
require "rubygems" | |
require "psych" | |
$LOAD_PATH.unshift(File.dirname(__FILE__)) | |
# specify your locales folder in Dir.glob("*") with relative path from this file | |
Dir.glob("*").sort.each do |file| | |
begin | |
Psych.parse(File.open(file)) | |
rescue Psych::SyntaxError => e | |
puts "#{file} -> #{e}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment