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 7650149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:10:42+00:00 2026-05-31T11:10:42+00:00

When I work with object of type Staffer, which inherits User which inherits ActiveRecord::Base

  • 0

When I work with object of type Staffer, which inherits User which inherits ActiveRecord::Base I get the error “TypeError: allocator undefined for Proc”.

I’m not sure what caused it to start happening and unfortunately it won’t be easy to track down the commit that did. Since the system was working properly, user.rb didn’t change and staffer.rb only change one line to remove an unused constant.

I first noticed the error when running a rake task and the error is generated from a line that does this:

attributes.slice("id", "email", "state")

further investigation showed that this triggers the error too:

puts attributes

and this is the backtrace:

rake aborted!
allocator undefined for Proc
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `allocate'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `block in visit_Psych_Nodes_Sequence'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `each'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `visit_Psych_Nodes_Sequence'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:8:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:191:in `block in visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each_slice'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/nodes/node.rb:25:in `to_ruby'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:107:in `load'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/coders/yaml_column.rb:25:in `load'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:24:in `unserialize'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:15:in `unserialized_value'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:82:in `__temp__'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:46:in `type_cast_attribute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:126:in `read_attribute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `block in attributes'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `map'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `attributes'
/Users/pupeno/Documents/watu/app/models/staffer.rb:151:in `index'

Trying to figure out what was going on, I opened a rails console and just got the first staffer, to encounter the same error:

1.9.2-p290 :019 > s = Staffer.first
  Staffer Load (3.8ms)  SELECT "users".* FROM "users" WHERE "users"."type" IN ('Staffer') LIMIT 1
TypeError: allocator undefined for Proc
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `allocate'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `revive'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `block in visit_Psych_Nodes_Sequence'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `each'
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `visit_Psych_Nodes_Sequence'
... 24 levels...
    from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:107:in `load'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/coders/yaml_column.rb:25:in `load'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:24:in `unserialize'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:15:in `unserialized_value'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:82:in `__temp__'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:46:in `type_cast_attribute'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:126:in `read_attribute'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:200:in `attribute_for_inspect'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/base.rb:640:in `block in inspect'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/base.rb:638:in `collect'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/activerecord-3.2.2/lib/active_record/base.rb:638:in `inspect'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start'
    from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290@watu/gems/railties-3.2.2/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
1.9.2-p290 :020 >
  • 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-31T11:10:43+00:00Added an answer on May 31, 2026 at 11:10 am

    Do you have any yaml-serialized data in one of your staffer/user fields?

    If so I think it has to do with the serialized data not with your code. Check to see if in your serialized data there’s a serialized Proc object or so… That should be the reason why it can’t load, cause somehow Procs can’t be serialized!?

    See this forum post.

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

Sidebar

Related Questions

Is there a way to make getDefinitionByName() work with any Object type, I have
If I want to work with an object and leverage LINQ to SQL what
Does Eigen::EigenSolver work on an object of class SparseMatrix ? In particular, I am
I'm trying to work out how to iterate though a returned SimpleXML object. I'm
Does ToolStripStatusLabel DoubleClick ever work? Private Sub myToolStripStatusLabel_DoubleClick(ByVal sender As System.Object, _ ByVal e
I have an NSDate object called 'dueDate'. I'm trying to work out how to
I'm trying to cast away const from an object but it doesn't work. But
Perhaps I'm misunderstanding how this should work, but I've created an object in the
I am intrigued by how V8's scopes work. How can a scope object on
I can't figure out why this simple update command won't work: private void button1_Click(object

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.