0

I'm facing this problem and could not get through by any means. Here is what it keeps saying always:

ActionView::Template::Error (stack level too deep):
    1: $('#workflow_selection').html("<%=j render "show_workflow_list" %>");
  app/views/deployment_group/show_workflow_list.js.erb:1:in `_app_views_deployment_group_show_workflow_list_js_erb___1968905592_2026'

Whenever it comes across <%= %>, in almost all the cases, it says that stack level is too deep. I removed all these <%= %> and copy pasted a HTML code instead. Now the view renders fine and to go to another view, it should take the help of this js.erb file. And now it says stack level too deep here.

Any suggestion or help in this regard will be very helpful to me, Thanks

Update

Link to the same kind of error with a normal code - link Most probably im missing something the vendor folder or some gem or some 'require' in the application. Someone who had already worked on deploying a rails application on tcserver will definitely know this

Community
  • 1
  • 1
user1455116
  • 2,034
  • 4
  • 24
  • 48
  • try ("<%=j(render :partial => "show_workflow_list") %>"); – Kyle C Aug 14 '12 at 17:43
  • @Kyle C hi kyle, it does not work no matter what change i make in any of the rails code on the view. I'm missing something important here, most probably something to be included in the vendor folder or some 'require' field in the code. People who have deployed rails on TCserver will definitely know this very well. Anyway thank you for your help – user1455116 Aug 14 '12 at 17:45

1 Answers1

0

You are rendering show_workflow_list inside of show_workflow_list, which is causing an infinite loop of renders. That is why the stack level is too deep.

Max
  • 15,157
  • 17
  • 82
  • 127
  • the above code works perfectly fine with other servers like Webrick or Mongrel. There is a drop down list on a view 'A' and some data is being displayed on view 'B' onchange in the drop downlist. Now, when i edit the _show_workflow_list deleting the entire content and displaying just 'Hello' it displays 'Hello' on change in the drop down list. Please see the link the update. – user1455116 Aug 14 '12 at 18:28
  • If you have `render 'file_name'` inside of file_name.xx.erb, then that is a bug, even if it works on other servers. – Max Aug 14 '12 at 20:07
  • I have changed the name of the partial to show_workflow_lists and now the error is "ActionView::Template::Error (stack level too deep): 1: $('#workflow_selection').html("<%=j render "show_workflow_lists" %>");" I dont know what is going wrong here, im trying this for three days, evethough it is a bug in this case, it should atleast work in the link that i provided as an update in my question above :( – user1455116 Aug 14 '12 at 20:33
  • Does the code above fail on load or fail on form submission? Do you have any directions in that controller? – Max Aug 14 '12 at 20:59
  • http://stackoverflow.com/questions/9851763/activescaffold-gives-stack-too-deep-error-can-not-find-any-recursion That will probably help you debug your problem. The stack too deep is almost certainly from some type of infinite redirect loop or recursion. – Max Aug 14 '12 at 21:07