NoMethodError (undefined method `synchronize' for nil:NilClass) #4757

Closed
assembler opened this Issue Jan 30, 2012 · 6 comments

Projects

None yet

5 participants

@assembler

I've just upgraded to rails 3.2.1 and I get that error whenever i want to do anything with any model. Here is my stack trace (https://gist.github.com/1703964) and here is my gemfile (https://gist.github.com/1704047)

I've tried to debug activerecord a bit, and it seems that this line https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/base.rb#L394 never gets called for any of my models.

I'm using ruby 1.9.2 p290

@assembler

If I do this during initialization:

User.initialize_generated_modules

then everything works as expected

@jonleighton
Member

Hmm, this is strange. Are you able to provide a script to reproduce?. Or a full rails app that produces the problem would be fine. If you want to send me your actual code privately then that's fine also, and I will not disclose it further (obviously). Thanks.

@codesnik
Contributor

having the same problem. a lot of gems used, though, I'll try to disable them one by one.

@markquezada

Same problem here. Also, I found some other people experiencing this on stack overflow:

http://stackoverflow.com/questions/9059729/rails-3-1-3-3-2-1-error

@vkill
vkill commented Jan 31, 2012

try update gem "kaminari" from "0.12.4" to "0.13.0"

@jonleighton
Member

@vkill thanks for working that out. looks like kaminari was overwriting the inherited hook, which would explain this. I will also put in a fix to stop this error occurring though.

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