Skip to content

Instantly share code, notes, and snippets.

@chaitu87
Last active July 22, 2019 12:18
Show Gist options
  • Save chaitu87/938d4779e01359c790bf0bcec70d1d48 to your computer and use it in GitHub Desktop.
Save chaitu87/938d4779e01359c790bf0bcec70d1d48 to your computer and use it in GitHub Desktop.
Finding precompile errors in rails, to be executed in 'rails console'
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
begin
Uglifier.compile(File.read(file_name))
rescue => e
puts $!
puts $@
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment