title: NoMethodError: undefined method `gsub' for nil:NilClass
body: <p>I added a condition option to my thinking sphinx search and I am now getting a <code>NoMethodError: undefined method `gsub' for nil:NilClass</code></p>
  
  <pre><code>        @users = User.search(params[:search].gsub(/\s+/, ' | '),
          :geo =&gt; [current_user.latitude * Math::PI / 180.0, current_user.longitude * Math::PI / 180.0],
          :with  =&gt; {:geodist =&gt; 0.0..100_000.0},
          :conditions =&gt; {:ethnicity =&gt; params[:ethnicity], :religion =&gt; params[:religion]},
          :order =&gt; 'geodist ASC', :without =&gt; {:user_id =&gt; current_user.id})
  
  
      end      
      render 'users/index', layout: 'new_application'    
  
    end
  </code></pre>