【发布时间】:2016-09-26 19:39:56
【问题描述】:
当我推送到 heroku 时,我遇到了这个错误,我不知道它是什么意思。它在本地运行良好,没有错误。
remote: Running: rake assets:precompile
remote: rake aborted!
remote: ExecJS::RuntimeError: SyntaxError: Unexpected token: operator (>) (line: 3766, col: 54, pos: 255542)
remote: Error
remote: at new JS_Parse_Error (/tmp/execjs20160926-272-1dcsr5bjs:3623:11948)
remote: at js_error (/tmp/execjs20160926-272-1dcsr5bjs:3623:12167)
remote: at croak (/tmp/execjs20160926-272-1dcsr5bjs:3623:22038)
remote: at token_error (/tmp/execjs20160926-272-1dcsr5bjs:3623:22175)
remote: at unexpected (/tmp/execjs20160926-272-1dcsr5bjs:3623:22263)
remote: at expr_atom (/tmp/execjs20160926-272-1dcsr5bjs:3623:31244)
remote: at maybe_unary (/tmp/execjs20160926-272-1dcsr5bjs:3624:1752)
remote: at expr_ops (/tmp/execjs20160926-272-1dcsr5bjs:3624:2523)
remote: at maybe_conditional (/tmp/execjs20160926-272-1dcsr5bjs:3624:2615)
remote: at maybe_assign (/tmp/execjs20160926-272-1dcsr5bjs:3624:3058)
remote: at maybe_assign (/tmp/execjs20160926-272-1dcsr5bjs:3624:3232)
remote: at expression (/tmp/execjs20160926-272-1dcsr5bjs:3624:3384)
remote: at expr_list (/tmp/execjs20160926-272-1dcsr5bjs:3623:31548)
remote: at subscripts (/tmp/execjs20160926-272-1dcsr5bjs:3624:1461)
remote: new JS_Parse_Error ((execjs):3623:11948)
remote: js_error ((execjs):3623:12167)
remote: croak ((execjs):3623:22038)
remote: token_error ((execjs):3623:22175)
remote: unexpected ((execjs):3623:22263)
remote: expr_atom ((execjs):3623:31244)
remote: maybe_unary ((execjs):3624:1752)
remote: expr_ops ((execjs):3624:2523)
remote: maybe_conditional ((execjs):3624:2615)
remote: maybe_assign ((execjs):3624:3058)
remote: maybe_assign ((execjs):3624:3232)
remote: expression ((execjs):3624:3384)
remote: expr_list ((execjs):3623:31548)
remote: subscripts ((execjs):3624:1461)
remote: /tmp/build_49f5fc95a42160b27bfb23a9d4154294/vendor/bundle/ruby/2.2.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
我的 application.js 文件如下。
//= require jquery_ujs
//= require bootstrap-slider
//= require turbolinks
//= require RGraph.common.core
//= require RGraph.common.dynamic
//= require RGraph.common.tooltips
//= require RGraph.hprogress
//= require_tree .
我尝试查找一些解决方案,但大多数问题涉及意外的令牌操作 ()。我不知道要在这里复制什么代码,因为我不知道问题出在哪里,但我会在需要或询问时复制并粘贴我的代码。
【问题讨论】:
-
你能在本地运行
rake assets:precompile吗? -
是的,我可以。在本地工作得很好
标签: javascript ruby-on-rails heroku deployment asset-pipeline