I've yet to get this gem to work after 30 mins of playing around.
I did everything in the installation section.
When trying pdf = WickedPdf.new.pdf_from_string('<h1>Hello There!</h1>') in my controller I get an exception:
uninitialized constant LandingsController::WickedPdf
When I try using render :pdf => "pdf" I get an empty pdf even though my view has <h1>Hello There!</h1>
Any suggestions as to how I can get this package to work?
Restart your server :)
3 years on (!) I had this issue too with Rails 5.2 - restarting my server and Rails console didn't help either. Exiting the console, running spring stop and then rails c again sorted it out for me.
@dominiceden so not really a wicked_pdf issue but rather a Spring annoyance / issue.
Most helpful comment
Restart your server :)