Ferret on Heroku

Hi all,

I am not familiar with Ferret (I would rather have used Thinking Sphinx,
but this is not possible on Heroku)

So I need to use Ferret for full text search on Heroku. I followed the
very little instructions they give on their site, but no chance…

I my model, I have added:
acts_as_ferret :options => {
:fields => [:name, :status, :contact],
:store_class_name => true

I have added following line in environment.rb:
require ‘acts_as_ferret’
ActsAsFerret.index_dir = “#{RAILS_ROOT}/tmp/index”

I’m not sure this is needed, but I have added to my .gems file:
acts_as_ferret --version 0.4.4
as version 0.4.3 makes my app crash on deploy.

I also have the acts_as_ferret plugin (is this needed on top of the gem?
I don’t clearly get it…) Do I need to change anything in
ferret_server.yml? Is there a specific heroku server to be specified?

Then when I run in heroku console
I get:
=> false

Locally, everything work as expected.

The next step is to have a search on several model… (I have spent
hours on Google, Forums and Blogs without finding any help)

I have tried:
Model1.find_with_ferret(@search_string, {:multi => [Model1, Model2,

But this only return results for the model I call find_with_ferret from
(in this case, I would get results from Model1). This work on my dev
machine, as I am unable to have ferret to work on Heroku…

I have asked these questions to their support, but sadly I didn’t get
any response…

Thanks for any detailed help with versions to be used and detailed


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs