# Newbie question about acts\_as\_taggable

**URL:** <https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703>\
**Category:** Rails\
**Created:** [April 3, 2006, 4:33am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703 "2006-04-03T04:33:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 4:33am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/1 "2006-04-03T04:33:23Z")

</div>

I installed the acts\_as\_taggable plugin that DHH wrote.

Now I have met problems on using it:

class Book \< ActiveRecord::Base  
acts\_as\_taggable  
end

mybook = Book.new  
mybook.tag\_with(‘red library book’)

But the system tell the wrong message:  
undefined method `parse' for Tag:Class d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1123:in `method\_missing’  
#{RAILS\_ROOT}/vendor/plugins/acts\_as\_taggable/lib/acts\_as\_taggable.rb:42:in  
`tag_with' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction’  
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active\_record/transactions.rb:91:in  
`transaction' #{RAILS_ROOT}/vendor/plugins/acts_as_taggable/lib/acts_as_taggable.rb:39:in `tag\_with’

btw: it seems the api at [http://taggable.rubyforge.org/](http://taggable.rubyforge.org/) does not fit the  
usage of the plugin at all,there seems to be two implementation of  
acts\_as\_taggable.

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 4:43am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/2 "2006-04-03T04:43:01Z")

</div>

I know the difference between the gem and plugin from  
[http://www.notio.com/2006/02/rails\_acts\_as\_t.html](http://www.notio.com/2006/02/rails_acts_as_t.html)

Since the plugin is the recommended way to use taggable,i decide to use  
it,but error found,anyone has met such a situation?

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 4:45am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/3 "2006-04-03T04:45:37Z")

</div>

btw, I am using rails 1.1 while not edge rails,i think the plugin can be  
used under this kind enviroment,isn’t it?

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 6:56am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/4 "2006-04-03T06:56:51Z")

</div>

I got my work using  
[http://wiki.rubyonrails.org/rails/pages/ActsAsTaggablePluginHowto](http://wiki.rubyonrails.org/rails/pages/ActsAsTaggablePluginHowto)

Bryan Buecking wrote:

> Frank wrote:
> 
> > But the system tell the wrong message:  
> > undefined method `parse’ for Tag:Class  
> > Have you defined a class named Tag?  
> > –  
> > Bryan Buecking

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 6:39am UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/5 "2006-04-03T06:39:00Z")

</div>

Frank wrote:

> But the system tell the wrong message:  
> undefined method `parse’ for Tag:Class  
> Have you defined a class named Tag?  
> –  
> Bryan Buecking

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [April 3, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/newbie-question-about-acts-as-taggable/56703/6 "2006-04-03T17:43:43Z")

</div>

#if bryan /\* Apr 03, 01:37 \*/

> > mybook.tag\_with(‘red library book’)
> > 
> > But the system tell the wrong message:  
> > undefined method `parse’ for Tag:Class  
> > Have you defined a class named Tag?  
> > #endif /\* removed\_email\_address@domain.invalid \*/

To clarify for any other newbies (like myself):

If you have a Tag class already defined, say for example in  
app/models/tag.rb, then remove it first. You dont need to create it.

I just hit the same problem after switching over from the gem version to  
the plugin one.

–  
keys: [http://codex.net/gpg.asc](http://codex.net/gpg.asc)

Why God never received a PhD:  
3. It had no references.
