Tuesday, July 22, 2008

Ultrasphinx Search Engine with Rails 2.0.2

ultrasphinx: Anonymous modules have no name to be referenced by

This error is caused due to the autoloading failing to load the required Ultrasphinx files in Rails 2.0.2. The following is the fix:

1. require 'ultrasphinx/fields' in ultrasphinx/configure.rb

2.

production.conf

source episodes_main
{
html_strip = 1
}

index main
{
strip_html = 0
}

3.
In environment.rb

config.after_initialize do
Ultrasphinx::Configure.load_constants
end

Notes:
git clone git://github.com/DrMark/ultrasphinx.git vendor/plugins/ultrasphinx
rm -rf vendor/plugins/ultrasphinx/.git

No comments:

Post a Comment