using metric_fu with vendorized gems

44 views
Skip to first unread message

Sudhindra Rao

unread,
Dec 27, 2011, 5:04:25 PM12/27/11
to metric_fu
Hi,
I have a rails app that uses vendorized gems. I am trying to use
metric_fu with it.
(Saikuro was already in use on this app)
I added metric_fu to the path like Saikuro was being used as follows

$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'saikuro_treemap-0.2.0', 'lib'))

$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'metric_fu-2.1.1', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'ruby_parser-2.3.1', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'sexp_processor-3.0.7', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'flay-1.4.3', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'flog-2.5.3', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'syntax-1.0.0', 'lib'))
$: << File.expand_path(File.join(RAILS_ROOT, 'vendor', 'build_gems',
'gems', 'churn-0.0.15', 'lib'))

I am adding stuff to the load path on an error by error. Here is the
error I get even after I added churn to the path
------------------------
** Invoke metrics:all (first_time)
** Execute metrics:all
proj_dir/vendor/build_gems/gems/metric_fu-2.1.1/lib/base/
configuration.rb:74: command not found: churn --yaml
rake aborted!
undefined method `[]' for false:FalseClass
proj_dir/vendor/build_gems/gems/metric_fu-2.1.1/lib/generators/
churn.rb:24:in `to_h'
proj_dir/vendor/build_gems/gems/metric_fu-2.1.1/lib/base/generator.rb:
134:in `generate_report'
proj_dir/vendor/build_gems/gems/metric_fu-2.1.1/lib/base/report.rb:
60:in `add'
--------------------------
On this machine nothing is installed as you see here
--------------------------
pair06:proj_dir$ gem list

*** LOCAL GEMS ***

bundler (1.0.21)
rake (0.8.7)
--------------------------
I am using ree 1.8.7.

Any help will be appreciated.

-Thanks
Sudhindra

Josh Cronemeyer

unread,
Mar 14, 2012, 1:44:44 PM3/14/12
to metr...@googlegroups.com
Hmm.  I bet i know what project that is for ;)

It sounds like the churn executable is what it is trying to use, not directly as a library.  My guess is that "installing" the gem is what puts the churn executable in place, so I don't think you will be able to simply load the gem and expect it to work here.

peace!

Sudhindra

--
You received this message because you are subscribed to the Google Groups "metric_fu" group.
To post to this group, send email to metr...@googlegroups.com.
To unsubscribe from this group, send email to metric_fu+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/metric_fu?hl=en.


Reply all
Reply to author
Forward
0 new messages