I have a bug with the gems wicked_pdf and remotipart . When creating a standard project:
$ rails new a1
Works!
If I add the gems in Gemfile
gem 'wicked_pdf'
gem 'remotipart'
and run $ bundle install
and start the rails server
$ rails s
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.3-p105), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
All good so far.
if i run in browser http://localhost:3000
I get the following error in the terminal
Started GET "/" for 127.0.0.1 at 2019-03-29 10:34:33 -0400
Processing by Rails::WelcomeController#index as HTML
Completed 500 Internal Server Error in 47ms (ActiveRecord: 0.0ms)
fatal - machine stack overflow in critical region:
In the browser:
Apparently the latest version of the wicked_pdf gem has a bug that hasn't been fixed yet (you can see the issue here ); while that problem is fixed you could use the latest version that doesn't show the error (ie 1.1.0), just specify it in your Gemfile :
Following on from the answer given by Gerry, you could try to use the latest master changes:
Or, as suggested in this comment , you could try monkey-patching
config/initializers/wicked_pdf.rb
to clear the method definitionrender
:and in its place use
render_with_wicked_pdf
, clearly all of this while an official patch has not yet been released , apparently they are still working on it .