Records for rails errors and solutions.
Error: Deploy processing fail and expose error below, but no detail log for where the error occur.
Error message: Uglifier::Error: Unexpected token: punc (,)
Solution: Go into ‘rails console’ mode, and run script below. Code position where error occur will show up.
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name), harmony: true)
end