"ObjectName can't be referred" error - session serialization

All,

I’m getting the following error:

TypeError (TargetList can’t be referred):
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:81:in
dump' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:81:inmarshal’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:133:in
`marshal_data!’

It appears to be occurring when I’m attempting to render something, and
the session is being serialized. Anyone seen an error like this?

I can’t figure out what it’s supposed to mean.

Thanks,
Wes

OK, I don’t know exactly what this was, but I was attempting to store a
collection of AR association objects in an object that was in the
session.

So, imagine Parent has_many Children and @parent is an instance of
Parent.

I was setting one of my object’s attributes to @a.children and putting
it into the session. Each of those objects in the collection is
actually an A object somehow - which again, seems to have to do with the
association magic.

Anyhow, I just took that out of the session (where it didn’t belong
anyway, since the whole point of what I’m doing is to use a custom
caching scheme to persist across requests), and everything’s fine.

I’m not sure what broke, but I will be wary about putting objects in the
session which contain sets of associations stored in any of their
attributes.

Thanks,
Wes

It’s weird though. I’m able to set an attribute on my object to the
equivalent of Parent and throw it on the session and it’s fine.

Argh.

WG

I found this while googling. I am trying to upgrade my application
from 1.1.6 to 1.2.3 and I’m getting this same TypeError thrown from
my session.
Did you ever figure out exactly what causes this? I have an object in
my session I use to make XML-RPC calls and rails can’t seem to
decipher the object when marshaling the session any more.

On Feb 5, 9:55 pm, Wes G. [email protected]

Paul wrote:

I found this while googling. I am trying to upgrade my application
from 1.1.6 to 1.2.3 and I’m getting this same TypeError thrown from
my session.
Did you ever figure out exactly what causes this? I have an object in
my session I use to make XML-RPC calls and rails can’t seem to
decipher the object when marshaling the session any more.

On Feb 5, 9:55 pm, Wes G. [email protected]

I did not find out what this was. Sadly, I’m having trouble deciphering
what I meant when I wrote this as well :(…