Rails 执行 rake assets:precompile 报错

nancy · 2012年06月29日 · 最后由 jhjguxin 回复于 2012年07月01日 · 4454 次阅读

执行 bundle exec rake assets:precompile --trace 报 ** Invoke assets:precompile (first_time) ** Execute assets:precompile /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p194@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace ** Invoke assets:precompile:all (first_time) ** Execute assets:precompile:all ** Invoke assets:precompile:primary (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:primary rake aborted! Unexpected token: operator (<) (line: 9915, col: 1, pos: 321257)

Error at new JS_Parse_Error (:3096:22) at js_error (:3104:15) at croak (:3557:17) at token_error (:3564:17) at unexpected (:3570:17) at :3943:17 at maybe_unary (:4028:27) at expr_ops (:4055:32) at maybe_conditional (:4059:28) at maybe_assign (:4083:28) (in /home/rails/agent/app/assets/javascripts/application.js)
不明白因为啥

应该是。。语法写错了吧

#1 楼 @jjym 什么语法错误?app/assets/javascripts/application.js和app/assets/stylesheets/application.css按默认的就可以了吧 views 中有啥特殊要求吗?

希望对你有用

(in /home/rails/agent/app/assets/javascripts/application.js) 
Unexpected token: operator (<) (line: 9915, col: 1, pos: 321257)
需要 登录 后方可回复, 如果你还没有账号请 注册新账号