Hi Oliver
I'm kinda surprised by this - I thought that array was being populated
at the beginning of each web request in the dev environment, but just
so I can track it down... what version of Rails are you using?
--
Pat
On 28/11/2009, at 4:21 AM, karmacoma wrote:
> Hi,
> Using the latest version of thinking-sphinx (1.3.6). I am getting the
> following error: "undefined method `name' for nil:NilClass" when
> destroying a record.
>
> The stack trace leads me to the following file: thinking-sphinx/lib/
> thinking_sphinx/active_record.rb:229
>
> def eldest_indexed_ancestor
> ancestors.reverse.detect { |ancestor|
> ThinkingSphinx.indexed_models.include?(ancestor.name)
> }.name
> end
>
> When the destroy method is called, "ThinkingSphinx.indexed_models"
> returns an empty array.
>
> However, according to my application it should be returning:
> ["Administrator", "Article", "Customer", "Order", "Product",
> "Representative"].
>
> * Within production it raises the exception every time (obviously, as
> the classes are cached).
> * Within development it raises this exception on the first invocation,
> but works on the second attempt, and subsequent attempts.
>
> This seems to be an issue related to lazy loading?
>
> In my application I often have to delete records. So I am hoping
> someone can help me fix this problem.
>
> Kind regards, Oliver Beddows.
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]
> .
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en
> .
>
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.