The symptom was that delayed indexing works find in production
(RAILS_ENV=production) but Delayed::Jobs were not getting enqueued in
development mode (RAILS_ENV=development).
It looks like the culprit was ThinkingSphinx::Attributed#live_value
hitting an exception ("undefined method").  It's called when
after_commit fires off update_attribute_values (which calls
attribute_values_for_index which calls live_value).
I am assuming that in production, these exceptions get thrown but
something catches them and the after_commit :index_delta still gets to
run.  Perhaps in development mode, things aren't so forgiving?
It looks like live_value runs into a problem with
 has permissionables(:readable), :as => :permissionable_kludge, :type
=> :boolean
[I have this defined so an OUTER JOIN gets emitted to permissionables]
The stack is object, :permissionables, :readable, so live_value does
object = object.send(:permissionables)
now object is an array of permissionables.  the array doesn't define
":readable" so we then get the undefined method error next time
through the loop.
I don't understand what any of this code is for, so I don't know the
best fix (perhaps this is just a documentation oversight and I'm mis-
using has() or perhaps I didn't properly read the docs).
My kludgey fix (kludge on top of kludge) was to change the has line to
refer to a string and change the type to string so it gets excluded
from the array that attribute_values_for_index iterates down.
Thanks again for a great package!
-- Jason
Just to confirm - though it sounds like a potential bug - are you using TS 1.1.14? Or 1.3.14 (ie: the latest version)?
-- 
Pat
> -- 
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> 
> 
>> To post to this group, send email to thinking- 
>> sph...@googlegroups.com.
I could have sworn I made live_value play nicely with arrays, but it looks like I'm wrong. Consider it a bug, and I'll try to get it fixed soon.
-- 
Pat
>>> To post to this group, send email to thinkin...@googlegroups.com.
>>> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
So try the attribute definition with :type => :multi instead.
-- 
Pat