Confirmation of the proper version of ts in development:

NoMethodError in Search#members

Showing app/views/members/_list.html.erb where line #16 raised:

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.length
Extracted source (around line #16):

13: num_per_page = is_cat ? Member.per_cat_page : Member.per_page
14: path = is_cat ? "/#...@city[:name].downcase.gsub(/\s/, '-')}/#
{[email protected]}" : search_path('members')
15:
16: if list.total_entries > 0
17:
18: -%>
19: <p><%= list.send (:latitude_attr) %></p>
Trace of template inclusion: app/views/search/members.html.erb

RAILS_ROOT: /Users/andrewlippert/Documents/Biznik/Source/trunk

Application Trace | Framework Trace | Full Trace
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/vendor/riddle/lib/riddle/client/message.rb:21:in `send'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/vendor/riddle/lib/riddle/client/message.rb:21:in
`append_string'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/vendor/riddle/lib/riddle/client.rb:531:in `query_message'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/vendor/riddle/lib/riddle/client.rb:286:in `query'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/lib/thinking_sphinx/search.rb:203:in `populate'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/lib/thinking_sphinx/search.rb:279:in `call'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/lib/thinking_sphinx/search.rb:279:in
`retry_on_stale_index'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/lib/thinking_sphinx/search.rb:200:in `populate'
/opt/ruby-ent/lib/ruby/gems/1.8/gems/freelancing-god-thinking-
sphinx-1.2.2/lib/thinking_sphinx/search.rb:149:in `total_entries'
/Users/andrewlippert/Documents/Biznik/Source/trunk/app/views/members/
_list.html.erb:16:in
`_run_erb_app47views47members47_list46html46erb_locals_list_object'
/Users/andrewlippert/Documents/Biznik/Source/trunk/app/views/search/
members.html.erb:14:in
`_run_erb_app47views47search47members46html46erb'
/Users/andrewlippert/Documents/Biznik/Source/trunk/app/views/search/
members.html.erb:12:in
`_run_erb_app47views47search47members46html46erb'
/Users/andrewlippert/Documents/Biznik/Source/trunk/app/controllers/
search_controller.rb:103:in `members'
Request

Parameters:

{"search"=>{"city"=>#<City:0x2f15cdc @long=-122.32971,
 @country="United States of America",
 @state="WA",
 @lat=47.60342,
 @lookup="Seattle",
 @name="Seattle",
 @country_code="US">,
 "local"=>"1",
 "origin"=>[47.60342,
 -122.32971],
 "terms"=>"google",
 "page"=>"1",
 "limit"=>30,
 "distance"=>"25"},
 "x"=>"47",
 "y"=>"14",
 "page"=>"1",
 "old_terms"=>"Search"}
Show session dump

Response

Headers:

{"Content-Type"=>"text/html; charset=utf-8",
 "Cache-Control"=>"no-cache"}

The upgrade of ts from 1.1.24 to 1.2.2 seems to be where I should
focus. Anything on my end that I need to change?

On Jul 30, 10:46 am, Andrew Lippert <[email protected]> wrote:
> list.send(:latitude_attr) does produce 'lat' in development as well.
>
> On Jul 30, 10:42 am, Andrew Lippert <[email protected]> wrote:
>
>
>
> > Bingo - I'm now able to reproduce the problem on development. Dumb,
> > dumb, dumb. But a good step forward. I get the same error as on
> > production now.
>
> > On Jul 30, 10:30 am, Pat Allan <[email protected]> wrote:
>
> > > Okay... looks like you're using an old (pre 1.2) version of Thinking  
> > > Sphinx on your development machine. Which is frustrating. I'd much  
> > > rather it be the other way around. Can you update dev, see if you get  
> > > the error locally?
>
> > > --
> > > Pat
>
> > > On 30/07/2009, at 6:28 PM, Andrew Lippert wrote:
>
> > > > In production, it actually returns a result:
>
> > > > lat
>
> > > > A
>
> > > > On Jul 30, 10:16 am, Pat Allan <[email protected]> wrote:
> > > >> Can you get the value of list.send(:latitude_attr)?
>
> > > >> --  
> > > >> Pat
>
> > > >> On 30/07/2009, at 6:09 PM, Andrew Lippert wrote:
--~--~---------~--~----~------------~-------~--~----~
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