-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrical/metric_fu gives the error: uninitialized constant MetricFu::Configuration - how do I require this properly? #36
Comments
I've been unable to reproduce this error. I've written up a wiki page with some pointers on additional information that would be helpful in debugging this error. Please add some more information. My guess, is that since I've changed the load order of some of the classes, you might be calling |
Ok, cool. Here are updates: Ubuntu 12.10 Configuration:
When I run What I've tried: requiring metric_fu in the gemfile instead of the Rakefile. This cause I've also tried metrical, which has a very similar setup (I just changed metric_fu to metrical in both my gemfile and rakefile, and it generated the same error) |
Thanks for the additional info. That helps. Try again with metric_fu gem version 2.1.3.7.18 which includes a bug fix (requiring the Configuration file before it's called in run.rb ) and is packaged for ruby 1.8. I'm not sure if version 2.1.3.7.19 will work for you. It's the same code, but packaged with the ruby 1.9 dependencies in mind. |
That version isn't available? gem "metric_fu", "2.1.3.7.18", :require => false $ bundle install (bundle update does the same thing) Do I need to specify a source or :git? |
My mistake. I somehow failed to push the gem. I've pushed it now. |
Got this:
|
What happens if you just run What happens if you go into irb and require rubygems and metric_fu? Does it return true? Does it do the same thing in the rails console? Thanks |
$ bundle exec metric_fu
:-( |
I apologize for the back and forth. Somehow when I made the ruby18 branch I deleted the require lines in the gemspec for everything.. 1a902d5 I've now re-released the gem as 2.1.3.7.18.1 (I'll up the minor version once I know this is working). I was able to run this with the following lines in my gemfile on ruby 1.8.7-p72
as both I appreciate you continuing to follow up here. I think this should work, but then I've thought that before. For bonus points, let me know if you can run |
It's cool. Just glad I can help. The company I'm working for doesn't really have the resources at the moment to upgrade to Rails 3, so I really appreciate helping get 1.8.7 compatibility working again. :-) After adding those to my gemfile, I have this in my in my Rakefile, I still just have I did find the output directory.... and at a glance the data looks ok. Not sure about the graphs though. Just a couple points an most of them.
they give some errors. Here they are:
I also get : For the bonus points: :-) $ gem install metric_fu -v 2.1.3.18.1 && gem install metric_fu-metrical $ bundle exec gem install metric_fu -v 2.1.3.18.1 && bundle exec gem install metric_fu-metrical so.. that's weird. :-\ |
Those warnings are expected. Did the metrics otherwise display properly? Can we consider this bug fixed? The reason it would be faster to run without rake is because I removed the rake dependency for running the metrics, and when you explicitly include it, it slows down. Also, the gem install line had a typo.. should have been |
Excellent. Yeah, I'd say we can consider the bug fixed. My problem of getting the thing to run at all is solved. :-) Ah, yeah, that makes sense. Thanks! |
great! |
Originally, I was following this guide: http://metric-fu.rubyforge.org/ But that didn't work (got the same error as I'm getting now). and I read that using metrical is supposedly easier, as it is supposed to do a lot of the set up for you. But the following happens:
From the Terminal,
$ bundle exec rake spec rake aborted! uninitialized constant MetricFu::Configuration
in my Gemfile I have:
gem "metrical", :require => false
and then in my rakefile I have:
require "metrical"
rails 2.3.14
ruby 1.8.7
metrical 0.1.0
I'm using metric_fu (2.1.3.6)
how can I require metrical / metric fu correctly?
If I just use metric_fu instead of metrical
I have
require "metric_fu", :require => false # in gemfile
and
require "metric_fu" # in my Rakefile
this metric_fu is 2.1.3.6 (same as above)
and when I run
bundle exec metric_fu
I still get the same error. :-\
EDIT by bf4: original question
The text was updated successfully, but these errors were encountered: