Ruby on Rails tips, tricks and hints for the aspiring rails hero.

Saturday, April 08, 2006

acts_as_taggable error I was getting

I had a this little app I've been working on in which I had implemented the acts_as_Taggable gem but with the all new, all shiny polymorphic goodness of Rails 1.1, I decided to make the jump to the less documented but cool-because-DHH-wrote-it-himself acts_as_Taggable plugin. After making the switch, I loaded up the console via..

ruby script\console

and tested it out and it seemed to be working ok. I then proceeded to follow Chad Fowler's Tagging article in his excellent Rails Recipes book which looked like it was going to work swell. And it did, until I tried to edit some existing tags. Try to do so threw the error,

undefined method `parse' for Tag:Class

After wondering why I was getting this error for a while and even looking through the soruce (being relatively new to RoR and Ruby, I didn't know enough to spot what the problem may be) but I did try taking out my Tag model since it wasn't mentioned in the Rails Recipe article and whaddaya know, that did the trick. So to reiterate, if you are getting the error

undefined method `parse' for Tag:Class

Remove your Tag.rb model, restart the web server and you should be good to go.

More on the plugin after I've tinkered with it for a while...


  • At 5:58 PM, Anonymous Scott Woods said…

    Bam! That was post was a direct hit for me. Thanks for solving my problem!

  • At 9:07 PM, Blogger Curtis said…

    you're welcome!

  • At 11:23 PM, Anonymous Anonymous said…

    Thanks, I realised what was wrong after I saw this post. I had a tag model as well as the plugin, and they were conflicting.

    Once again, thanks a bunch!



Post a Comment

<< Home