# Ferret on Heroku

**URL:** <https://www.ruby-forum.com/t/ferret-on-heroku/172968>\
**Category:** Ferret\
**Created:** [July 30, 2009, 5:03pm UTC](https://www.ruby-forum.com/t/ferret-on-heroku/172968 "2009-07-30T17:03:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/3d9bf3/32.png) [@norad](https://www.ruby-forum.com/u/norad)\
**Post date:** [July 30, 2009, 5:03pm UTC](https://www.ruby-forum.com/t/ferret-on-heroku/172968/1 "2009-07-30T17:03:08Z")

</div>

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  
MyModel.tion.rebuild\_index  
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,  
Model3]})

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  
steps…

N.R.
