Skip to content

Instantly share code, notes, and snippets.

@sle-c
Created August 11, 2017 17:19
Show Gist options
  • Save sle-c/fdb65e19654c8aeef5555326c4aa8a08 to your computer and use it in GitHub Desktop.
Save sle-c/fdb65e19654c8aeef5555326c4aa8a08 to your computer and use it in GitHub Desktop.
Debugging rails asset pipeline js precompile errors with uglifier
# runs rails console and copy + paste this snippet in to see the offending file
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment