Rails 3.1 Possible Bug in Asset Pipeline and Uglifier

前端 未结 4 1771
借酒劲吻你
借酒劲吻你 2021-01-19 20:03

I ran into a problem deploying on Heroku do to a failure in the rake task

rake assets:precompile

At the bottom is the error I get if I inte

4条回答
  •  滥情空心
    2021-01-19 20:18

    You will probably find that one of you js files has a syntax error somewhere. This could be a missing semicolon at the end of a block, or some other minor problem. Often browsers will still load the js and it will work, but uglifier cannot compress it with those errors. I would start looking in the localisation files first.

    One way to find out which file contains the error is to re precompile locally with a minimal set of files and add things one by one until it breaks. If it is due to a missing semicolon, the breakage will the second-last file you added.

提交回复
热议问题