Looking into this, it seems that sphinx_indexes is nil. Is there
anything obvious I need to check in order to fix that? Still not sure
as to why I'd only be getting this error on subsequent searches (the
rest of my app runs OK when the error occurs in TS).

Anyone any ideas?


Cheers!


Matt


On Jul 22, 12:52 pm, Matt <[email protected]> wrote:
> Thinking Sphinx v1.1.24
>
> I'm getting an error on every search I run except from the first from
> when my app is started. Essentially, the search works on the first
> request, then subsequent requests give me the following error:
>
> NoMethodError in SearchController#index
>
> You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.last
>
> RAILS_ROOT: /Users/matt/Work/project
> Application Trace | Framework Trace | Full Trace
>
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/active_record.rb:101:in `sphinx_index_options'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:490:in `client_from_options'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:450:in `search_results'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:364:in `search'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:388:in `call'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:388:in `retry_search_on_stale_index'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/search.rb:363:in `search'
> /Users/matthall/Work/project/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/active_record/search.rb:29:in `search'
> /Users/matthall/Work/project/app/controllers/search_controller.rb:6:in
> `index'
> /Users/matthall/Work/project/app/controllers/search_controller.rb:5:in
> `each'
> /Users/matthall/Work/project/app/controllers/search_controller.rb:5:in
> `index'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:1322:in `send'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:1322:in `perform_action_without_filters'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> filters.rb:617:in `call_filters'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> filters.rb:610:in `perform_action_without_benchmark'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> benchmarking.rb:68:in `perform_action_without_rescue'
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> core_ext/benchmark.rb:17:in `ms'
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> core_ext/benchmark.rb:10:in `realtime'
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> core_ext/benchmark.rb:17:in `ms'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> benchmarking.rb:68:in `perform_action_without_rescue'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> rescue.rb:160:in `perform_action_without_flash'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> flash.rb:141:in `perform_action'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:523:in `send'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:523:in `process_without_filters'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> filters.rb:606:in `process'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:391:in `process'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> base.rb:386:in `call'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
> routing/route_set.rb:433:in `call'
>
> Anyone seen this before?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to