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

Exception in WickedPdfHelper#running_in_development? when using Shakapacker 8 #1133

Open
kemenaran opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1134
Open

Exception in WickedPdfHelper#running_in_development? when using Shakapacker 8 #1133

kemenaran opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1134

Comments

@kemenaran
Copy link

Issue description

When using Shakapacker >= 8, calling WickedPdfHelper#running_in_development? raises an exception:

uninitialized constant WickedPdf::WickedPdfHelper::Assets::Webpacker (NameError)

        if Webpacker.respond_to?(:dev_server)
           ^^^^^^^^^

Expected or desired behavior

Calling WickedPdfHelper#running_in_development? returns a boolean, without raising an exception.

Causes

This error occurs because Shakapacker 8 renamed all Webpacker constants to Shakapacker.

System specifications

wicked_pdf gem version (output of cat Gemfile.lock | grep wicked_pdf): 2.8.2

shakapacker gem version : 8.0.2

@kemenaran kemenaran linked a pull request Nov 7, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant