Hi,
I’m using the 2.0.2 version of the acts_as_taggable gem, along with
Rails 1.1.6. I have a model Item:
class Item < ActiveRecord::Base
acts_as_taggable
…
end
Then, I run ruby script/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:inconst_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:inconstantize' 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:inacts_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:inrequire_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:inrequire_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 methodfind_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