Skip to content
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

ActionView::Template::Error uninitialized constant WickedPdf::WickedPdfHelper::Assets::SprocketsEnvironment::Sprockets #1102

Open
DanTaiko opened this issue Feb 6, 2024 · 2 comments

Comments

@DanTaiko
Copy link

DanTaiko commented Feb 6, 2024

The v2.7.0 of wicked_pdf seems not to be fully incompatible with Rails 7.
Rails 7.0 makes Sprockets an optional dependency. We don't use Sprockets in our Rails 7.1 app and updating wicked_pdf to v2.7.0 make us a bit of trouble.

There is a addition to WickedPdf::WickedPdfHelper::Assets#read_asset that makes the difference:
asset = find_asset(source)

Downgrading wicked_pdf back to v2.6.3 restored the functionality.

@dmrwebdev
Copy link

Our Rails 7.1 application just experienced the same constant error when dependabot updated our application to v2.8.0 from v.2.7.0. We are not using sprockets either.

fblupi added a commit to AjuntamentdeBarcelona/decidim-barcelona that referenced this issue Mar 21, 2024
@fblupi
Copy link

fblupi commented Mar 21, 2024

Same problem in an application with Rails 6.1.7.7 deployed in Heroku. Downgrading from v2.8.0 to v2.7.0 made the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants