部署我的Rails应用程序时,我收到以下错误:
rake aborted!
ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» (line: 15, col: 14, pos: 265)
Error
at new JS_Parse_Error (/tmp/execjs20150524-4411-1p45n63js:2359:10623)
at js_error (/tmp/execjs20150524-4411-1p45n63js:2359:10842)
at croak (/tmp/execjs20150524-4411-1p45n63js:2359:19086)
at token_error (/tmp/execjs20150524-4411-1p45n63js:2359:19223)
at expect_token (/tmp/execjs20150524-4411-1p45n63js:2359:19446)
at expect (/tmp/execjs20150524-4411-1p45n63js:2359:19584)
at /tmp/execjs20150524-4411-1p45n63js:2359:28513
at /tmp/execjs20150524-4411-1p45n63js:2359:19957
at expr_atom (/tmp/execjs20150524-4411-1p45n63js:2359:27269)
at maybe_unary (/tmp/execjs20150524-4411-1p45n63js:2359:30019)new JS_Parse_Error ((execjs):2359:10623)
js_error ((execjs):2359:10842)
croak ((execjs):2359:19086)
token_error ((execjs):2359:19223)
expect_token ((execjs):2359:19446)
expect ((execjs):2359:19584)
(execjs):2359:28513
(execjs):2359:19957
expr_atom ((execjs):2359:27269)
maybe_unary ((execjs):2359:30019)
Run Code Online (Sandbox Code Playgroud)
有问题的文件是有效的,它适用于localhost.我也试过rake assests:precompile在localhost上运行,一切都通过了.最后,我试图从文件中删除内容,git push和redeploy - 仍然得到相同的错误.只有完全删除文件并重新部署帮助.
会欣赏任何想法.
我有问题将我的rails项目推送到heroku.我收到"预编译资产失败"消息.我是编程新手,也是ruby on rails的新手.我真的需要一些帮助.这是我命令行中的文本.
$ git push heroku master
Counting objects: 76, done.
Compressing objects: 100% (63/63), done.
Writing objects: 100% (76/76), 27.38 KiB | 11.00 KiB/s, done.
Total 76 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native …Run Code Online (Sandbox Code Playgroud) RAILS_ENV=production rake assets:precompile --trace
Digest::Digest is deprecated; use Digest
Digest::Digest is deprecated; use Digest
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
ExecJS::RuntimeError: SyntaxError: Unexpected token operator «=», expected punc «,» (line: 159, col: 25, pos: 5132)
Error
at new JS_Parse_Error (/tmp/execjs20161124-23752-1wuk17bjs:3623:11948)
at js_error (/tmp/execjs20161124-23752-1wuk17bjs:3623:12167)
at croak (/tmp/execjs20161124-23752-1wuk17bjs:3623:22038)
at token_error (/tmp/execjs20161124-23752-1wuk17bjs:3623:22175)
at expect_token (/tmp/execjs20161124-23752-1wuk17bjs:3623:22411)
at expect (/tmp/execjs20161124-23752-1wuk17bjs:3623:22562)
at ctor.argnames (/tmp/execjs20161124-23752-1wuk17bjs:3623:27486)
at function_ (/tmp/execjs20161124-23752-1wuk17bjs:3623:27550)
at /tmp/execjs20161124-23752-1wuk17bjs:3623:24469 …Run Code Online (Sandbox Code Playgroud)