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/ does not fit the usage of the plugin at all,there seems to be two implementation of acts_as_taggable. -- Posted via http://www.ruby-forum.com/.
I know the difference between the gem and plugin from 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? -- Posted via http://www.ruby-forum.com/.
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? -- Posted via http://www.ruby-forum.com/.
Frank wrote:> 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:ClassHave you defined a class named Tag? -- Bryan Buecking
I got my work using 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-- Posted via http://www.ruby-forum.com/.
#if bryan /* Apr 03, 01:37 */> Frank wrote: > >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 > Have you defined a class named Tag?#endif /* bryan@vanten.com */ 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 Why God never received a PhD: 3. It had no references.
Reasonably Related Threads
- Seek brilliant Rails programmer to add one field to acts_as_taggable
- Acts_as_taggable / Rails Recipes bug?
- ROR Recipes Beta: Why use taggings instead of tags_contacts? NoMethodError tag_with?
- duplicate entry issue in acts_as_taggable gem
- problem with posting with acts as taggable on steroids