-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WickedPDF is killing my application. SystemStackError (stack level too deep): #823
Comments
What version of WickedPDF? |
1.2.2 didn't work for me. My case scenario is that another gem redefines
When it attempts to render these controller's views, I have the stack too deep error. [EDIT] |
@brunovelasco Thank you for reporting this. @krtschmr Did you try updating yet, or did you ever figure out which dependency is getting in a loop with WickedPdf? |
I had this with wicked_pdf 1.2.1 on rails 4.2.10 and ruby 2.4.4. Upgrading to wicked_pdf 1.2.2 fixed it. Just posting this in case the combination of components helps someone else. |
I have same problem. rails 5.2.3 and in controller I have: def render(*args) options = args.extract_options! options[:template] = "/admin/hotel_reservations/hotelbeds/#{params[:action]}" super(*(args << options)) end and this error: SystemStackError (stack level too deep): app/controllers/admin/hotelbeds_reservations_controller.rb:90:in `render' app/controllers/admin/hotelbeds_reservations_controller.rb:22:in `new' with wicked_pdf version 1.2.0 and 1.2.1: SystemStackError (stack level too deep): wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `call' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:30:in `render' remotipart (1.4.2) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `call' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:30:in `render' remotipart (1.4.2) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `call' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:30:in `render' remotipart (1.4.2) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `call' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf' wicked_pdf (1.2.1) lib/wicked_pdf/pdf_helper.rb:30:in `render' remotipart (1.4.2) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart' Only with wicked_pdf 1.1.0 it works. |
offtopic: throw your render method away.
problem solved |
@krtschmr Thanks, but it not help, because views are in paths:
and controllers are:
and
So I changed my code to def render_cangooroo_template render layout: false, template: "/admin/hotel_reservations/cangooroo/#{params[:action]}" end And it is fixed for me. |
it's still bad code. very bad actually. i don't know about your routes, but i assume you have a both should be inheriting from a
but you don't even need to deal with this stuff if you have the correct namespacing and naming. having one controller serving 2 templates is most of the time very bad approach. instead making it 2 controllers. those are different things anyways ;) |
@krtschmr You are right, I will change namespacing. |
Application is working fine.
added wicked_pdf to gemfile
now nothing is working andymore and i always receive the following message
rails 4.2.3 with ruby 2.1.0
adding initializer or mimetype won't fix it
The text was updated successfully, but these errors were encountered: