# Hijack DB Tutorial Question

**URL:** <https://www.ruby-forum.com/t/hijack-db-tutorial-question/142977>\
**Category:** Ferret\
**Created:** [July 14, 2008, 5:51am UTC](https://www.ruby-forum.com/t/hijack-db-tutorial-question/142977 "2008-07-14T05:51:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huckyducky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b19c9b/32.png) [@huckyducky](https://www.ruby-forum.com/u/huckyducky)\
**Post date:** [July 14, 2008, 5:51am UTC](https://www.ruby-forum.com/t/hijack-db-tutorial-question/142977/1 "2008-07-14T05:51:15Z")

</div>

I am one of the foolhardy people who hijacks the connection on each  
request.

I have followed the tutorial on multiple databases to the letter, and I  
first verified that acts\_as\_ferret works with the find\_by\_ferret method.

I am not runnning drb yet, this is in development mode on my Mac.

Instead of using a domain hash, I am using an account number. I have  
modified all of the scripts accordingly.

While find\_by\_ferret, before the account\_hash modifications to my models  
did indeed return results, I get no results after the modification. I  
assume this is because there isn’t an index yet which knows about the  
account\_hash.

Now there is a script at the bottom of the tutorial on the project site  
at [http://projects.jkraemer.net/acts\_as\_ferret/wiki/MultipleDatabases](http://projects.jkraemer.net/acts_as_ferret/wiki/MultipleDatabases).

There is a statement to the effect that says “Here is my script”.

Unfortunately I cannot figure out what to do with that script. Where to  
put it. How to run it. Etc.

Is it a rake task? Is it just an rb file? What libraries do I require  
in order to get it to run? Do I have to run it regularly? If so,  
should I schedule it? How?

I don’t expect anyone to hold my hand all the way, really I just want to  
run the script. I tried a regular ruby file, and rake task, and both  
have met with failure because I don’t know what files to require.

Please, please help, as I have already burned 8 hours trying to  
implement AAF against multiple dbs with no progress today. It is going  
to be awesome when I get it working though.
