Try updating to the latest version of TS - there's been a bug fix to
the total_pages method since 1.2.5.
If that doesn't fix things, let me know.
--
Pat
On 01/09/2009, at 5:53 AM, nipunj wrote:
>
> I've been banging my head against a brick wall for most of the
> day, ... hoping someone out there can throw me a rope. Thanks, in
> advance.
>
> Thinking_sphinx is up and running on my VPS. The index is built and
> the daemon running I see conf when starting the daemon:
> creating server socket on 127.0.0.1:3333
> Started successfully (pid 30919).
>
> Also, I am able to execute "search -c config/production.sphinx.conf
> test" from the command line and see expected results.
>
> My problem apparently exists in my view (helper) where I am getting
> the following exception:
> ActionView::TemplateError (undefined method `/' for nil:NilClass) on
> line #2 of app/views/packs/list.html.erb:
> 2: <%= page_entries_info @packs %>
> ...
> /home/nipun/.gem/ruby/1.8/gems/freelancing-god-thinking-
> sphinx-1.2.5/lib/thinking_sphinx/search.rb:139:in `total_pages'
> vendor/gems/mislav-will_paginate-2.3.11/lib/will_paginate/
> view_helpers.rb:171:in `page_entries_info'
> app/views/packs/list.html.erb:2
> app/controllers/search_controller.rb:9:in `index'
> passenger (2.2.4) lib/phusion_passenger/rack/request_handler.rb:
> 91:in `process_request'
>
> the offending code exists within lib/search.rb of Thinking_Sphinx:
> def total_pages
> @total_pages ||= (total_entries / per_page.to_f).ceil (line
> #139)
> end
>
> I am pretty certain the call to will_paginate that defines @packs is
> compliant:
> Pack.search terms, :weights => {'title' => 3.0, 'description' => 2.0,
> 'cached_tag_list' => 2.5}, :page => page, :per_page =>
> self.per_page, :include => [:user]
>
> This functionality is working on the development box and not in
> production. So, I am inclined to believe this is somehow a product of
> how TS is configured. Also, the template code above is within a
> partial that is rendering for non-search driven actions. So....
>
> What gives? Anyone have any ideas on how to possibly fix/attack this?
> I'm out of them.
>
> Background: this was working fine. Until,... I redeployed Thinking
> Sphinx in an attempt to get the scheduled indexing working. Boy, I'm
> regretting that move now.
>
> Thanks again,
> NJ
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---