Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:47:21+00:00 2026-05-23T12:47:21+00:00

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

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:47:22+00:00Added an answer on May 23, 2026 at 12:47 pm

    ActiveModel::Naming creates a #model_name method on your object. The completeness-fu gem seems to require it for the #define_completeness_scoring method.

    From the readme:

    Completeness-Fu used to be for ActiveRecord only, but this has changed with the latest version with only ActiveModel needed as a gem dependency (and a little ActiveSupport). This means that the latest version works with the following ORMs :

    • ActiveRecord
    • Mongoid
    • Cassandra Object

    The define_completeness_scoring method is mixed into the above mentioned ORMs by default, but if you want to use Completeness-Fu in an ActiveModel model which isn’t one of the above ORMs, make sure you include ActiveModel::Naming. If you want to cache the completeness score make sure you also include ActiveModel::Validations and ActiveModel::Validations::Callbacks.

    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.

    # lib/completeness-fu.rb
    module CompletenessFu
      module ActiveModelAdditions
        def self.included(base)
          base.class_eval do
            def self.define_completeness_scoring(&checks_block)
              # The check below is causing the problem; the simplest fix in Ruby 1.8
              # would be to simply remove it by commenting out the following 3 lines.
              unless self.singleton_class.include?(ActiveModel::Naming)
                raise CompletenessFuError, 'please make sure ActiveModel::Naming is included so completeness_scoring can translate messages correctly'
              end
    
              class_inheritable_array :completeness_checks
              cattr_accessor :default_weighting
              cattr_accessor :model_weightings
    
              self.send :extend, ClassMethods
              self.send :include, InstanceMethods
    
              checks_results = CompletenessFu::ScoringBuilder.generate(self, &checks_block)
    
              self.default_weighting   = checks_results[:default_weighting]
              self.completeness_checks = checks_results[:completeness_checks]
              self.model_weightings    = checks_results[:model_weightings]
    
              if checks_results[:cache_score_details]
                unless self.include?(ActiveModel::Validations::Callbacks)
                  raise CompletenessFuError, 'please make sure ActiveModel::Validations::Callbacks is included before define_completeness_scoring if you want to cache competeness scoring'
                end
                self.before_validation checks_results[:cache_score_details]
              end
            end
          end
        end
      end
    end
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm receiving an error while trying to install a gem called typhoeus (this is
Installing Merb on Ruby Enterprise Edition (OS X) throws this error, any ideas? sudo
After installing VMware Server I get the following error when I try to access
I have written this gem that has more than 10,000 generated classes. While installing
I am having issues installing the ScrAPI gem: ERROR: Error installing scrapi: ffi requires
I am having a problem installing the mysql2 gem. This comes up when I
Possible Duplicate: ERROR: While executing gem … (Zlib::GzipFile::Error) not in gzip format When installing
The following error comes up: C:\gem>gem install sqlite3-ruby --local Building native extensions. This could
After installing the Resque gem and running a worker my app now produces an
When installing subversion as a service, I used this command: c:\>svnservice -install --daemon --root

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.