Undefined method `sphinx_facets' for nil:NilClass

I am getting
A NoMethodError occurred in main#search:

undefined method sphinx_facets' for nil:NilClass [RAILS_ROOT]/vendor/plugins/ thinking-sphinx/lib/thinking_sphinx/facet_search.rb:131:infacet_from_object’

Its occur in special scenerio…
Can any body tell me when and how to resolve this exception??

Thanks

On 11 Feb 2010, at 12:48, Rabia Akhtar wrote:

Can any body tell me when and how to resolve this exception??

  1. Make sure you don’t get nil values
  2. If nil values can’t be avoided, check for nil and don’t call
    sphinx_facets on it.

Best regards

Peter De Berdt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs