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

WIP: Gem binary locations #764

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

WIP: Gem binary locations #764

wants to merge 4 commits into from

Conversation

tilsammans
Copy link

Hi there! A heads up!
I've been working on a patch that automatically discovers if any of the wkhtmltopdf-binary gems are installed. Along the way I made changes to the way the executable is discovered.
I think it's an improvement. At this stage I would like to know what you think.
It might be close to done or not quite yet. I'm ready for any scenario. ;)

automatically finds gems with wkhtmltopdf included, and uses their
executable. reordered some locations, so that manual configuration
always trumps autodetection.
and add what we done did to the README.
@unixmonkey
Copy link
Collaborator

I love the idea of this. It's been turning out to be a bigger problem lately, and I've been instructing some people to start using a variation of this:

WickedPdf.config = {
  exe_path: "#{ENV['GEM_HOME']}/gems/wkhtmltopdf-binary-#{Gem.loaded_specs['wkhtmltopdf-binary'].version}/bin/wkhtmltopdf_linux_amd64"
}

depending on which gem they are using. The binary doesn't always work when called from a binstub because the stub could be loading a different environment.

Thank you for looking into this. ❤️ Let me know if you have any questions or need help!

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

Successfully merging this pull request may close these issues.

2 participants