views:

533

answers:

5

I'm trying to get tags working in my rails application and want to use acts_as_taggable. Firstly I followed the instructions I found in Rails Recipies (a free sample bit online) that used the acts_as_taggable plugin. However, I then found this site which seems to have a gem for acts_as_taggable which is more advanced (has options for related tags etc).

I've tried to follow the instructions there to install it, but I keep getting errors.

Firstly I installed the gem as normal (gem install acts_as_taggable) and then I tried various ways to get rails to recognise and load the gem. The require_gem listed on the site didn't work (I assume that is an old command that has been removed) and neither did a straight require (although that has worked for my bluecloth gem).

I've then tried using config.gem 'acts_as_taggable' but that keeps telling me that I haven't got acts_as_taggable installed and asks me to run rake gems:install. No matter how many times I run that it still gives the error!

Any ideas?

A: 

Have you tried running something like "gem query -l -n taggable" to check whether it has installed correctly into your local gem repository?

If it has you could use some of the built in checks against it - Gem is good for this - to make sure it installed as it is supposed to.

That would be my first avenue to explore.

glenatron
A: 

The result of the gem query -l -n acts_as_taggable lists acts_as_taggable as an installed local gem.

I've tried running gem check and that doesn't show any problems.

Any other ideas?

robintw
A: 

What do you get when you try to require it from the rails console?

glenatron
A: 

The response I get when I try to require it from the console is:

MissingSourceFile: no such file to load -- acts_as_taggable
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge
m_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_suppo
rt/dependencies.rb:510:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_suppo
rt/dependencies.rb:355:in `new_constants_in'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_suppo
rt/dependencies.rb:510:in `require'
        from (irb):1

It looks like for some reason it can't find it. Any ideas why?

robintw
+2  A: 

You could also try acts_as_taggable_on_steroids:

This plugin is based on acts_as_taggable by DHH but includes extras such as tests, smarter tag assignment, and tag cloud calculations.

I've used it recently. Aside from some performance issues, it works very well and, unlike taggable, is under active maintenance.

Romulo A. Ceccon