部署 卡在 assets:precompile 了

stephen · 2012年03月06日 · 最后由 stephen 回复于 2012年03月06日 · 3594 次阅读
executing `deploy:assets:precompile'
  * executing "cd /home/apps/blog/releases/20120306025416 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
    servers: ["vm-192-168-11-11.shengyun.grandcloud.cn"]
    [vm-192-168-11-11.shengyun.grandcloud.cn] executing command
    [vm-192-168-11-11.shengyun.grandcloud.cn] rvm_path=/home/stephen/.rvm /home/stephen/.rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'cd /home/apps/blog/releases/20120306025416 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] rake aborted!
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] Unexpected character '' (line: 22477, col: 1, pos: 674146)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] Error
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at new JS_Parse_Error (/tmp/execjs20120306-29729-1sgujyu.js:497:22)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at js_error (/tmp/execjs20120306-29729-1sgujyu.js:505:15)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at parse_error (/tmp/execjs20120306-29729-1sgujyu.js:597:17)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at next_token (/tmp/execjs20120306-29729-1sgujyu.js:839:17)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at handle_slash (/tmp/execjs20120306-29729-1sgujyu.js:793:32)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at Object.next_token [as input] (/tmp/execjs20120306-29729-1sgujyu.js:836:39)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at next (/tmp/execjs20120306-29729-1sgujyu.js:943:37)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at Object.semicolon [as 1] (/tmp/execjs20120306-29729-1sgujyu.js:986:38)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at prog1 (/tmp/execjs20120306-29729-1sgujyu.js:1530:28)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at simple_statement (/tmp/execjs20120306-29729-1sgujyu.js:1123:35)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] (in /home/apps/blog/releases/20120306025416/app/assets/javascripts/application.js)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] Tasks: TOP => assets:precompile:primary
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] (See full trace by running task with --trace)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] 
    command finished in 11247ms
*** [deploy:create_symlink] rolling back
  * executing "ls -x /home/apps/blog/releases"
    servers: ["vm-192-168-11-11.shengyun.grandcloud.cn"]
    [vm-192-168-11-11.shengyun.grandcloud.cn] executing command
    [vm-192-168-11-11.shengyun.grandcloud.cn] rvm_path=/home/stephen/.rvm /home/stephen/.rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'ls -x /home/apps/blog/releases'
    command finished in 976ms
*** no previous release to rollback to, rollback of symlink skipped
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/apps/blog/releases/20120306025416; true"
    servers: ["vm-192-168-11-11.shengyun.grandcloud.cn"]
    [vm-192-168-11-11.shengyun.grandcloud.cn] executing command
    [vm-192-168-11-11.shengyun.grandcloud.cn] rvm_path=/home/stephen/.rvm /home/stephen/.rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'rm -rf /home/apps/blog/releases/20120306025416; true'
    command finished in 818ms
failed: "rvm_path=/home/stephen/.rvm /home/stephen/.rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'cd /home/apps/blog/releases/20120306025416 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on vm-192-168-11-11.shengyun.grandcloud.cn

*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at prog1 (/tmp/execjs20120306-29729-1sgujyu.js:1530:28)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] at simple_statement (/tmp/execjs20120306-29729-1sgujyu.js:1123:35)
*** [err :: vm-192-168-11-11.shengyun.grandcloud.cn] (in /home/apps/blog/releases/20120306025416/app/assets/javascripts/application.js)

报错是说编译 js 出现错误, application.js 里面有什么?

@linjunhalida

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require autocomplete-rails
//= require jquery.form
//= require jquery.remotipart
//= require jquery.autogrow-textarea
//= require jquery.caret
//= require rails.validations
//= require bootstrap.min
//= require app

@linjunhalida app 是自己写的,用 coffeescript,其他都是插件了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号