# Troubleshooting "undefined class/module"

**URL:** <https://www.ruby-forum.com/t/troubleshooting-undefined-class-module/49258>\
**Category:** Ruby\
**Created:** [December 1, 2005, 9:18pm UTC](https://www.ruby-forum.com/t/troubleshooting-undefined-class-module/49258 "2005-12-01T21:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve.enzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@steve.enzer](https://www.ruby-forum.com/u/steve.enzer)\
**Post date:** [December 1, 2005, 9:18pm UTC](https://www.ruby-forum.com/t/troubleshooting-undefined-class-module/49258/1 "2005-12-01T21:18:14Z")

</div>

I’m having a bit of a headbanger here… maybe someone can help.

A class in a fairly complicated existing Rails app that I’m working on  
seems intermittently not to load.  
The error is basically the following:

undefined class/module InnerPackage

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action\_controller/session/active\_record\_store.rb:75:in  
`load' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/session/active_record_store.rb:75:in`unmarshal’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action\_controller/session/active\_record\_store.rb:116:in  
`data' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/session/active_record_store.rb:126:in`marshal\_data!’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active\_record/callbacks.rb:333:in  
`send' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callbacks.rb:333:in`callback’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active\_record/callbacks.rb:330:in  
`each' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callbacks.rb:330:in`callback’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active\_record/callbacks.rb:248:in  
`create\_or\_update’

I’ve seen this happen if the controller file has a syntax error, but  
that’s not it. I’m interested mostly hearing a debugging approach that  
I haven’t tried, or if you’ve banged your head on this one before, what  
you learned in doing so.

The model file is in app\_root/app/models  
The problem is intermittent, and goes away for a while if I restart  
WEBrick
