views:

173

answers:

2

hi i have installed metric_fu om a rails 2.2 system running hobo and i just can't get to run the metrics command. this is my log:

$: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

i google a lot and found this http://groups.google.com/group/rubyonrails-talk/browse%5Fthread/thread/8e7ba74ea6ba58a1 but that "fix" doesn't even get the line or method name right.

A: 

Try:

gem install sexp_processor

pongo
A: 

I got this problem when I upgraded to Snow Leopard. I fixed it by removing and reinstalling the sexp_processor and ParseTree gems. They do some low level stuff, so if ground beneath them moves you need to reinstall.

gem uninstall sexp_processor gem uninstall ParseTree

Then:

gem install sexp_processor gem install ParseTree

Depending on how you store gems, you may want to put 'sudo' in front of those commands.

Jake Scruggs