How to debug acts_as_ferret on production system?


I’ve been happily using acts_as_ferret on a Rails site in
development mode, but deploying to a production system causes
some errors I haven’t been able to resolve.

My production deployment setup is Apache/mongrel and I’m
sharing the index directory across each deployment version
by linking {current_path}/index to {shared_path}/index in
the Capistrano setup. Edge Rails is svn externals’d into
the releases.

Visiting the new production system for the first time
leaves this error in the production.log:

 LoadError (Expected
 .../current/config/../app/models/page.rb to define Page):
 active_support/dependencies.rb:246:in `load_missing_constant'

Now that model class Page, is just:

 class Page < ActiveRecord::Base

Next I set the debugging level to debug and re-tried the page
which gave the same error.

Okay, maybe the indexes aren’t built, so I did a:

 ruby script/console production
 Loading production environment.
 >> Page.rebuild_index
 => false

The logfile now shows a bunch of “Adding Field” messages and
a final:

 Created Ferret index in:

The page still fails with the same message in the production.log.

Can anyone suggest a better way to debug these production



Stuart Hungerford
ANUSF Data Intensive Projects