I\'m doing this tutorial and am stuck in the Tagging part. Basically I have articles that can have a list of tags. As one article can has multiple tags and vice versa, there
FYI, I can confirm this is an issue with ActiveRecord and Ruby 2.2. I was using ActiveRecord 3.2 and since changing to the 3-2-stable branch, the issue is gone. I believe this is fixed now in 4.x branches. I have raised an issue for this at https://github.com/rails/rails/issues/18991.
I think there is a bug in activerecord 4.1.0 with has_cached_counter? and ruby 2.2. It was fixed on activerecord 4.1.2.
I got it to work by switching rails versions from 4.1.0 to 4.1.2.
Upgrade to Rails 4.0.13 (or later) or downgrading to Ruby 2.1.1 solves the problem.
I got it to work by switching ruby versions. I was using ruby-head
, which is ruby 2.2.0dev
. Switched back to ruby-2.1.1
, now it works without errors. Should've probably tried that earlier...
Maybe this could help others facing similar errors.