新手问题 Rails 为什么有事没事总是出现个诡异的错误?

kenneth · 2012年11月05日 · 最后由 mvj3 回复于 2013年03月06日 · 3425 次阅读
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/blankslate-3.1.2/lib/blankslate.rb:51: warning: undefining `object_id' may cause serious problems
/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
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/blankslate-3.1.2/lib/blankslate.rb:51: warning: undefining `object_id' may cause serious problems
rake aborted!
Unexpected token: punc (:) (line: 2, col: 12, pos: 14)

Error
    at new JS_Parse_Error (/tmp/execjs20121105-18614-a5muur.js:1720:22)
    at js_error (/tmp/execjs20121105-18614-a5muur.js:1728:15)
    at croak (/tmp/execjs20121105-18614-a5muur.js:2189:17)
    at token_error (/tmp/execjs20121105-18614-a5muur.js:2196:17)
    at unexpected (/tmp/execjs20121105-18614-a5muur.js:2202:17)
    at Object.semicolon [as 1] (/tmp/execjs20121105-18614-a5muur.js:2222:51)
    at prog1 (/tmp/execjs20121105-18614-a5muur.js:2770:29)
    at simple_statement (/tmp/execjs20121105-18614-a5muur.js:2362:35)
    at /tmp/execjs20121105-18614-a5muur.js:2257:59
    at block_ (/tmp/execjs20121105-18614-a5muur.js:2459:32)
  (in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/faye-rails-1.0.3/vendor/assets/javascripts/faye-browser-min.js.map)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/...]

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
You have new mail in /var/mail/root

这又是怎么了?完全不知道咋回事,我代码都没改,也报错。

没人遇到这个问题?blankslate 这个 gem 干嘛的?我怎么卸载了又出来?

大概加估计:你的 rails 或某些 gem 版本有点低

@huacnlee掌握了核型技术的人帮看看,这个错误让我无法编译资源文件了。

@kenneth 解决了吗?

把 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/faye-rails-1.0.3/vendor/assets/javascripts/faye-browser-min.js.map 删掉就解决了

问题解决记录在: http://code.eoe.cn/426/

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