How to debug syntax errors prompiling?

I try to click on Heroku after some Frontend touches, but I have some errors when precompiling (I think syntax errors).

The thing is, I get the line number of precompiled assets, not the original ones, so I don’t know how to debug it.

  ExecJS::ProgramError: Unexpected token: operator (<) (line: 20575, col: 0, pos: 641944)
       Error
       at new JS_Parse_Error (/tmp/execjs20141029-3052-g386xfjs:2357:10623)
       at js_error (/tmp/execjs20141029-3052-g386xfjs:2357:10842)
       at croak (/tmp/execjs20141029-3052-g386xfjs:2357:19067)
       at token_error (/tmp/execjs20141029-3052-g386xfjs:2357:19204)
       at unexpected (/tmp/execjs20141029-3052-g386xfjs:2357:19292)
       at /tmp/execjs20141029-3052-g386xfjs:2357:27484
       at /tmp/execjs20141029-3052-g386xfjs:2357:29977
       at expr_ops (/tmp/execjs20141029-3052-g386xfjs:2357:30735)
       at /tmp/execjs20141029-3052-g386xfjs:2357:30827
       at /tmp/execjs20141029-3052-g386xfjs:2357:31270
+4
source share
2 answers

You can usually compile your resources locally in this situation, and then go to the appropriate line in the file of the compiled application .js.

So,

bundle exec rake assets:precompile

(you need to have a local "production" database to run this bundle exec rake db:create:all)

public/assets/application-some_md5_hash.js

20575 < -

, public/assets,

, , CSS, -md5stuff.css

+3

, , Gemfile ​​ ruby ​​running

  bundle exec rake assets:precompile

, , .

0

All Articles