I have a problem on my ruby on rails application. It uses too much memory whenever it encounters an undefined method. It freezes the server until I kill the process. Error log points to the undefined method that goes to something like this:
ActionView::Template::Error (undefined method `testos' for #<#:0x007fb3d88de8c8>):
Is there any way or configuration to fix this? I am using ruby 1.9.3 on rails 3.2.2.
Here is the stack trace
Completed 500 Internal Server Error in 53960ms
ActionView::Template::Error (undefined method
testos' for #<#<Class:0x007fb3d43d0420>:0x007fb3d479c8d8>): 77: @rules["data"].each do |rule| 78: json_rule =ActiveSupport::JSON.decode(rule["json_rule"])
block in _app_views_rules_index_html_erb_4146358986539966513_70205169705180'
79: %>
80: <%=testos(1)%>
81: <div class="dvGridRow" style="width:100%;padding-bottom:10px;">
82: <div class="dvGridData" style="vertical-align:top;width:190px;margin-left:5px;">
83: <%= json_rule["rule_name"]%>
app/views/rules/index.html.erb:80:in
app/views/rules/index.html.erb:77:ineach'
_app_views_rules_index_html_erb_4146358986539966513_70205169705180'
app/views/rules/index.html.erb:77:inRendered /Users/jay/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (6.4ms) cache: [GET /manage/rules] miss Rendered /Users/jay/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.8ms) Rendered /Users/jay/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (18.5ms)
note: I intentionally called an unidentified method, because I am trying to figure out where does my code freezes the machine, and that error causes it.
Thanks