Chad Moone
2010-Oct-15 05:36 UTC
AssociationTypeMismatch / Model Caching in development envirnment
Hi there— I''m trying to get started with Rails, and I''ve run into this issue and searched high and low--so hopefully someone can help point me in the right direction. I''m having an issue where my model classes seem to be getting cached by something, and so if I make subsequent requests, I get an AssociationTypeMismatch error. To be specific, on update is where it fails, and I get: ActiveRecord::AssociationTypeMismatch in ArticlesController#update Category(#2159283720) expected, got Category(#2154954600) So sometimes this is successful, and the POST requests are identical. I can change the ''config.cache_classes = false'' to true in the config/environments/development to true and i won''t get the error anymore, but then I have to reload the server every time I make a change. I read that plugins could be caching it since they don''t reload for every request, but I don''t think I''m using any plugins, so I''m guessing that isn''t it. I can''t figure out where to look next and would appreciate any help you can offer. I''m running Ruby 1.9.2p0 and Rails 3.0.1 on OS X 10.6.4. You can download the code that I''m trying to work on at http://github.com/downloads/ccjr/blog/chapter08.zip (I''m trying to work through this Apress book). When you load up the page, you need to log in to edit, and the login is ''mary-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org'' : ''guessit''. Any pointers or ideas? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Possibly Parallel Threads
- Validation problem with active record: AssociationTypeMismatch
- ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
- Validation problems: ActiveRecord::AssociationTypeMismatch
- AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
- Devise AssociationTypeMismatch