-
Notifications
You must be signed in to change notification settings - Fork 647
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
v2.8.0 causing ActionView::Template::Error: no implicit conversion of nil into String for first time in years #1117
Comments
This sounds like it could possibly be related to this line change I think in I see you are using If you were using
Please try adding an extension like git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'wicked_pdf', github: 'd4rky-pl/wicked_pdf', branch: 'local-assets-fixes' And let me know how it goes. I plan on merging that soon, but I'd love to know if it fixes your issue specifically, while not specifying an extension. I worry that it might still choose the wrong asset if you have both a However, I think that's reasonable. Base64 can be anything, so I think ultimately you should specify the extension as well. Please let me know how it goes! |
Amazing, tsm for the fast reply @unixmonkey. That makes perfect sense. I should be able to test that for you tomorrow |
Hey @unixmonkey neither of these suggestions appear to have worked. I tried adding the file extension I'm short on time this week so happy to revert to 2.7.0 for now but it would be good to try and identify and address the issue |
@WhisperClaims Interesting. Before you quit, did you also add the path to the asset? Like, assuming If that didn't work, and you get a minute, I'd be curious if you can run the rails console in production and run Good luck! |
No I didn't @unixmonkey - I will do asap and will report back |
I was experiencing a similar issue, and this thread was super helpful to understand what's going on.
Curiously this not only happened in production only, but only when rendering the PDF in a Delayed Job. Requesting it live from the app worked normally. Checking
Thank you both :) |
Same issue here with 2.8. |
Method
generate_report_pdf
is causingActionView::Template::Error: no implicit conversion of nil into String
error in wicked_pdffind_asset
method in Staging & Production environments on Heroku onlyExpect no error in asset retrieval
System specifications
wicked_pdf (2.8.0)
wkhtmltopdf 0.12.6 (with patched qt)
wkhtmltopdf-binary (0.12.6.6) used in test / development only
Heroku-22 Stack with heroku/nodejs & heroku/ruby buildpacks
Line 6 (in bold - stylesheet_link_tag) is causing the issue
We recently updated our gemfile, including incrementing Rails 7.0.8 > 7.0.8.1 and wicked_pdf 2.7.0 > 2.8.0 which introduced the issue. PDF report generation failing as a result.
Everything works as expected if we revert to wicked_pdf (2.7.0)
Happy to supply as much more information as needed to identify the cause!
The text was updated successfully, but these errors were encountered: