gpt4 book ai didi

javascript - ExecJS::ProgramError:尝试为生产预编译 Assets 时出现意外字符 '#'

转载 作者:数据小太阳 更新时间:2023-10-29 04:56:25 25 4
gpt4 key购买 nike

我正在尝试使用以下命令为 Rails 4.1.1 应用程序编译 Assets 错误。

错误如下所示,

$ RAILS_ENV=production bundle exec rake assets:precompile
rake aborted!
ExecJS::ProgramError: Unexpected character '#' (line: 13079, col: 0, pos: 361024)

Error
at new JS_Parse_Error (<eval>:2357:10623)
at js_error (<eval>:2357:10842)
at parse_error (<eval>:2357:12560)
at Object.next_token [as input] (<eval>:2357:17582)
at next (<eval>:2357:18881)
at semicolon (<eval>:2357:19726)
at simple_statement (<eval>:2357:22538)
at <eval>:2357:20689
at <eval>:2357:19938
at <eval>:2357:31926
at Object.parse (<eval>:2358:98)
(in /opt/rails/crj.com/app/assets/javascripts/application.js)/home/capin/.gem/ruby/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/capin/.gem/ruby/2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:61:in `block (3 levels) in define'
/home/capin/.gem/ruby/2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:60:in `block (2 levels) in define'
V8::Error: Unexpected character '#'
at js_error (<eval>:2357:10842)
at parse_error (<eval>:2357:12560)
at next_token (<eval>:2357:17582)
at next (<eval>:2357:18881)
at semicolon (<eval>:2357:19726)
at simple_statement (<eval>:2357:22538)
at <eval>:2357:20689
at <eval>:2357:19938
at <eval>:2357:31926
at parse (<eval>:2358:98)
at <eval>:19:24
at <eval>:53:3
/home/capin/.gem/ruby/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/capin/.gem/ruby/2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:61:in `block (3 levels) in define'
/home/capin/.gem/ruby/2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:60:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

我尝试使用 --trace 开关/选项运行上面提到的命令,但我对导致此错误的原因一无所知。可以在此处完整查看该项目 => https://github.com/ipatch/crj.com

最佳答案

demo.js 是一个 JavaScript 文件,但它使用 CoffeeScript 注释 (#) 而不是 JavaScript 注释 (//)。

关于javascript - ExecJS::ProgramError:尝试为生产预编译 Assets 时出现意外字符 '#',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25334276/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com