> 
> Does anything show up in the log file when you do this ? A possible
> problem might be missing write permissions to your RAILS_ROOT, though
> I think this should result in an error.
> 

Thanks for the tip, Jens.

I think I figured this out.  It turns out it was two separate problems, 
for those who are interested.

1. My find_by_contents calls are wrapped in a with_scope(:include). 
find_by_contents has a line

conditions = [ "id in (?)", id_array ]

During development, this was causing a MySQL "ambiguous column id" 
error, because the tables I was joining each contained an id column.  I 
had changed the line to

conditions = [ "#{self.name.pluralize}.id in (?)", id_array ]

which worked fine on my Windows box.

On the Linux box, MySQL was complaining about an "unknown column 
Foos.id".  I hadn't realized that MySQL on Linux was case-sensitive, 
whereas Windows is not, so I changed the line to

conditions = [ "#{self.name.downcase.pluralize}.id in (?)", id_array ]

2. I had defined a WhiteSpaceAnalyzer (different from the one defined in 
Ferret) in my environment.rb file, and was calling it in acts_as_ferret. 
For some reason, though, the analyzer being used was the 
WhiteSpaceAnalyzer defined in Ferret, instead of mine.  My guess as to 
why this is happening is because of the order in which environment.rb 
and ferret are loaded?  I'm not even sure redefining it in 
environment.rb is the right way to do it, so I'd be happy if someone 
knew what the right way of doing this is.  My workaround was just to 
rename my analyzer.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to