Wicked_pdf: WickedPdf uninitialized

Created on 6 Mar 2015  路  3Comments  路  Source: mileszs/wicked_pdf

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?

Most helpful comment

Restart your server :)

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dgdosen picture dgdosen  路  5Comments

m-andreas picture m-andreas  路  5Comments

supriyas12 picture supriyas12  路  4Comments

netwire88 picture netwire88  路  7Comments

lsarni picture lsarni  路  5Comments