Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not marshal an ActiveRecord object with anything in association_cache #6909

Closed
danielfarrell opened this issue Jun 29, 2012 · 4 comments
Closed

Comments

@danielfarrell
Copy link

We are in process of upgrading to 3.2.x from 3.0.x and are running into a "singleton can't be dumped" when saving a AR object(user) into the session.

I've narrowed it down to an AR object not being able to be marshaled if there is anything in the association_cache. It works if I clear the cache, or if I don't use a relation and instead just memoize with a find_by_user_id on the other model.

It looks to have started sometime in the 3.2 series. Anyone have thoughts? Is this something I should work around?

@steveklabnik
Copy link
Member

/cc @tenderlove @jonleighton

@tenderlove
Copy link
Member

Can you give us reproduction steps? Even a full demo rails app would be fine.

@danielfarrell
Copy link
Author

Looks like this does not happen in a new clean app. Must be something screwed up in our app that is causing this. Sorry for wasting your time, should have checked that first.

@danielfarrell
Copy link
Author

For anyone else who happens to come by this. The issue is from the composite_primary_keys gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants