This is one of those short articles that I post only when Google fails to turn up any useful information and I hope my solution will be helpful to others. If you are using the acts_as_taggable plugin in an older Rails project that you've recently come back to upgrade to Rails 2, you may find that you get an error like this one: NameError (undefined local variable or method `acts_as_taggable' for ...

I honestly don't know what changed, possibly the updates that were made to auto-loading constants (which I never really bothered to learn about), or maybe the difference is in my rubygems version. I'm not sure. Anyway, if you're seeing it, you can try putting this below your gem statement: require 'taggable'.

That fixed it for me, using Rails 2.0.2 and the acts_as_taggable gem version 2.0.2.

Sorry, comments are closed for this article.