您已安装metric_fu om rails 2.2系统运行hobo,我无法运行metrics命令。这是我的日志:
$:apfcool $item rake metrics:all
(in /Users/$/Documents/apf/apfcool)
* master
/Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:171:in `process_sexp': undefined method `<' for nil:NilClass (NoMethodError)
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:309:in `[]'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:309:in `deep_each'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:318:in `each_sexp'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:315:in `each'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:315:in `each_sexp'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:308:in `deep_each'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:169:in `process_sexp'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:144:in `process'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:121:in `each'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/lib/flay.rb:121:in `process'
from /Users/$/.gem/ruby/1.8/gems/flay-1.4.0/bin/flay:10
from /usr/bin/flay:19:in `load'
from /usr/bin/flay:19
rake aborted!
undefined method `first' for nil:NilClass
我谷歌很多,发现这个http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/8e7ba74ea6ba58a1,但“修复”甚至没有正确的行或方法名称。
答案 0 :(得分:0)
当我升级到Snow Leopard时,我遇到了这个问题。我通过删除并重新安装sexp_processor和ParseTree gem来修复它。他们做了一些低级别的东西,所以如果他们下面的地面移动你需要重新安装。
gem uninstall sexp_processor 宝石卸载ParseTree
然后:
gem install sexp_processor gem安装ParseTree
根据您存储宝石的方式,您可能希望在这些命令前加上“sudo”。