Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Marcus Westin
RE: find_tagged_with [ reply ]  
2008-03-12 18:02
For similar problems with Rails 2.0.2, see http://marcuswestinblog.blogspot.com/2008/02/ruby-actsastaggable-plugin-bug-fix.html


By: Robert Spielmann
find_tagged_with [ reply ]  
2006-10-20 16:08
gem version 2.0.2, rails 1.1.6, model Item:

class Item < ActiveRecord::Base
acts_as_taggable
# ...
end

console:
>> Item.find_tagged_with('whatever')
NameError: uninitialized constant Tag
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:123:in `const_missing'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:131:in `const_missing'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
inflector.rb:161:in `constantize'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
core_ext/string/inflections.rb:59:in `constantize'
from
/usr/lib/ruby/gems/1.8/gems/acts_as_taggable-2.0.2/lib/taggable.rb:
169:in `acts_as_taggable'
from script/../config/../config/../app/models/item.rb:3
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:140:in `load'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:56:in `require_or_load'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:30:in `depend_on'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:85:in `require_dependency'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:98:in `const_missing'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:131:in `const_missing'
from (irb):1

>> @l = Item.find_tagged_with('beautiful')
NoMethodError: undefined method `find_tagged_with' for Item:Class
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/b
ase.rb:1129:in `method_missing'
from (irb):2

I understand none of the two errors. Any help?

Regards,
Robert