Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

undefined method `length' for #<Enumerable::Enumerator:0xb6e31dfc> #4

Closed
vijendra opened this Issue Aug 18, 2009 · 5 comments

Comments

Projects
None yet
5 participants

I have cloned latest copy of the extension.

Am I missing some thing? for few of the search terms I am getting, "Recursion error: already rendering the `body' part." for which I have logged another issue.
Server trace:

NoMethodError (undefined method length' for #<Enumerable::Enumerator:0xb6e31dfc>): vendor/extensions/search/app/models/search_page.rb:72:intag:highlight'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:181:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in expand' vendor/extensions/search/app/models/search_page.rb:121:intag:search'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:437:in parse_end_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:363:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in to_s' radiant (0.8.0) vendor/radius/lib/radius.rb:437:inparse_end_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:181:inexpand'
vendor/extensions/search/app/models/search_page.rb:38:in tag:search:results:each' vendor/extensions/search/app/models/search_page.rb:36:ineach'
vendor/extensions/search/app/models/search_page.rb:36:in tag:search:results:each' vendor/extensions/search/app/models/search_page.rb:35:intag:search:results:each'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:181:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in expand' vendor/extensions/search/app/models/search_page.rb:28:intag:search:results'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:181:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in expand' vendor/extensions/search/app/models/search_page.rb:121:intag:search'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:270:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:437:in parse_end_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:363:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in to_s' radiant (0.8.0) vendor/radius/lib/radius.rb:437:inparse_end_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:181:inexpand'
vendor/extensions/search/app/models/search_page.rb:28:in tag:search:results' radiant (0.8.0) lib/radiant/taggable.rb:33:insend'
radiant (0.8.0) lib/radiant/taggable.rb:33:in render_tag' radiant (0.8.0) app/models/page_context.rb:10:ininitialize'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:275:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:306:in stack' radiant (0.8.0) vendor/radius/lib/radius.rb:274:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:18:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:270:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:181:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:181:inexpand'
vendor/extensions/search/app/models/search_page.rb:121:in tag:search' radiant (0.8.0) lib/radiant/taggable.rb:33:insend'
radiant (0.8.0) lib/radiant/taggable.rb:33:in render_tag' radiant (0.8.0) app/models/page_context.rb:10:ininitialize'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:275:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:306:in stack' radiant (0.8.0) vendor/radius/lib/radius.rb:274:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:18:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:270:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:18:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:437:inparse_end_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:363:into_s'
radiant (0.8.0) vendor/radius/lib/radius.rb:402:in parse' radiant (0.8.0) vendor/radius/lib/radius.rb:363:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in to_s' radiant (0.8.0) vendor/radius/lib/radius.rb:404:inparse'
radiant (0.8.0) app/models/page.rb:287:in parse' radiant (0.8.0) app/models/page.rb:292:inparse_object'
radiant (0.8.0) app/models/page.rb:142:in render_snippet' radiant (0.8.0) app/models/standard_tags.rb:374:intag:content'
radiant (0.8.0) lib/radiant/taggable.rb:33:in send' radiant (0.8.0) lib/radiant/taggable.rb:33:inrender_tag'
radiant (0.8.0) app/models/page_context.rb:10:in initialize' radiant (0.8.0) vendor/radius/lib/radius.rb:275:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:275:in render_tag' radiant (0.8.0) vendor/radius/lib/radius.rb:306:instack'
radiant (0.8.0) vendor/radius/lib/radius.rb:274:in render_tag' radiant (0.8.0) app/models/page_context.rb:18:inrender_tag'
radiant (0.8.0) vendor/radius/lib/radius.rb:450:in parse_individual' radiant (0.8.0) vendor/radius/lib/radius.rb:451:inparse_individual'
radiant (0.8.0) vendor/radius/lib/radius.rb:422:in pre_parse' radiant (0.8.0) vendor/radius/lib/radius.rb:363:incall'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in to_s' radiant (0.8.0) vendor/radius/lib/radius.rb:402:inparse'
radiant (0.8.0) vendor/radius/lib/radius.rb:363:in call' radiant (0.8.0) vendor/radius/lib/radius.rb:363:into_s'
radiant (0.8.0) vendor/radius/lib/radius.rb:404:in parse' radiant (0.8.0) app/models/page.rb:287:inparse'
radiant (0.8.0) app/models/page.rb:292:in parse_object' vendor/extensions/search/app/models/search_page.rb:105:inrender'
radiant (0.8.0) app/models/page.rb:116:in process' radiant (0.8.0) app/controllers/site_controller.rb:46:inprocess_page'
radiant (0.8.0) app/controllers/site_controller.rb:20:in show_page' radiant (0.8.0) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:inprocess'

Did u fix this? Just trying this extension for the first time and getting the same error.

Member

jondkinney commented Sep 19, 2009

I am experiencing this problem as well. Anything I can do to help?

tekknikk commented Oct 1, 2009

I never got this to work. The sphinx approach works, is well documented and results rock.

Changing String#chars to String#mb_chars in search_page.rb helps actually... Details here.

Owner

saturnflyer commented Jan 7, 2010

use mb_chars. Closed by 7a9be4b

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment