I am installing a gem called completeness-fu.
This is the error I get:
completeness-fu-0.6.0/lib/completeness-fu/active_model_additions.rb:12:in `define_completeness_scoring': please make sure ActiveModel::Naming is included so completeness_scoring can translate messages correctly (CompletenessFu::CompletenessFuError)
What does that mean?
ActiveModel::Namingcreates a#model_namemethod on your object. The completeness-fu gem seems to require it for the#define_completeness_scoringmethod.From the readme:
Updated
See comments; the underlying issue seems to be a bug in the gem (as of 29 June, 2011). This could be monkey-patched using the following code (assuming Ruby 1.9). The only change is using
self.singleton_class.include?(ActiveModel::Naming)to get the proper response.Warning!!!
This is a super temporary (and fragile) monkey-patch, and I really don’t recommend actually using code like this in a production capacity.
The better options would be to find a different gem for this, work with the author to get it fixed, fork the project and fix it yourself then use that fork in your project (more info) or simply rebuild this functionality in your app locally using the gem as a starting design.