I started using the acts_as_ferret plugin for ruby on rails today. I had a a few issues, so here is how I solved them.

  1. script/plugin install svn:// does not work! – After successfully installing ferret using the gem, I tried to download the plugin, but my box could not connect. I am not sure if it is an error with my setup or what. So I had to browse the source tree in track and copy and past the files on my box.
  2. Rails will not start – After I copied across the plugin, Rails was complaining that it could not find the plugin acts_as_ferret. It turned out that the plugin directory I had made was not world readable, so rails could not read it. A quick chmod fixed that
  3. Site was not getting indexed – After putting the acts_as_ferret in the desired models, I searched for words that I knew existed and i was not getting any responses. I figured out that it was not being indexed. if the index directory does not exist than the plugin calls rebuild_index method. This is supposed to go through your database and create the index. The app was failing executing the rebuild_index method. I googled the error and came across this post It was an error because i was using Unicode. So I added the following to my environment.rb file and it has indexed the files :

ENV[‘LANG’] = ‘en_GB.UTF-8’

ENV[‘LC_TIME’] = ‘C’

All I have to do now is figure out how to use ferret šŸ™‚



3 comments so far

  1. divotdave on

    Under item #1 – You need to have Subversion installed on your box in order for that link to work.

  2. Hamza on

    Thanks for the comment. I do have subversion installed.

    I realised later that my firewall was blocking the port.

    Thanks anyway!


  3. tovorinok on


    Great book. I just want to say what a fantastic thing you are doing! Good luck!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: