You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command Error: The wkhtmltopdf executable in the wkhtmltopdf-binary-edge gem is being loaded, but it's also present in other gems (wkhtmltopdf-binary)
#907
Open
RubenGram opened this issue
Apr 24, 2020
· 4 comments
The next problem ocurred when I was trying to create a pdf:
"The wkhtmltopdf executable in the wkhtmltopdf-binary-edge gem is being loaded, but it's also present in other gems (wkhtmltopdf-binary) If you meant to run the executable for another gem, make sure you use a project specific binstub (bundle binstub <gem_name>)"
Are both wkhtmltopdf-binary-edge and wkhtmltopdf-binary gems necessary?
Error: Failed to execute: ["/.rbenv/versions/2.3.6/bin/wkhtmltopdf", "-q", "--encoding", "UTF-8", "file:///var/folders/ds/70lrh2194yb9jnwgzx28vm100000gn/T/wicked_pdf20200423-33047-47tsw2.html", "/var/folders/ds/70lrh2194yb9jnwgzx28vm100000gn/T/wicked_pdf_generated_file20200423-33047-1hbwcmu.pdf"] Error: PDF could not be generated! Command Error: The wkhtmltopdfexecutable in thewkhtmltopdf-binary-edge gem is being loaded, but it's also present in other gems (wkhtmltopdf-binary). If you meant to run the executable for another gem, make sure you use a project specific binstub (bundle binstub <gem_name>). If you plan to use multiple conflicting executables, generate binstubs for them and disambiguate their names. /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/bin/wkhtmltopdf:17:in exec': Bad CPU type in executable - /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/libexec/wkhtmltopdf-darwin-x86 (Errno::E086) from /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/bin/wkhtmltopd`
System specifications
wicked_pdf gem version: 0.11.0
wkhtmltopdf version (output of wkhtmltopdf --version): 0.12.5 (with patched qt)
wkhtmltopdf-binary version: 0.12.4
wkhtmltopdf-binary-edge version: 0.12.2.1
platform/distribution and version: MacOS Catalina
Rails version: 4.2.1
The text was updated successfully, but these errors were encountered:
This really depends on your platform. Locally I've installed it with homebrew on Mac OS X. In this case you could just use the wkhtmltopdf-binary. For us we also have CircleCI which requires a specific version so we do this in our Gemfile
gem "wkhtmltopdf-binary-edge", "~> 0.12.4.0" if ENV["CIRCLECI"]
Then because we deploy on Heroku we again have this in our :production group:
group :production, :staging do
gem "wkhtmltopdf-heroku"
end
If your simply developing this locally and then deploying it on your own Ubuntu distro you would probably be fine with just wkhtmltopdf-binary
Additionally, If you look at the README for the wkhtmltopdf-binary-edge gem, it's recommended for use in development & testing only. This is because it includes binaries for various operating systems and therefore large in size.
Issue description
The next problem ocurred when I was trying to create a pdf:
"The
wkhtmltopdf
executable in thewkhtmltopdf-binary-edge
gem is being loaded, but it's also present in other gems (wkhtmltopdf-binary) If you meant to run the executable for another gem, make sure you use a project specific binstub (bundle binstub <gem_name>
)"Are both wkhtmltopdf-binary-edge and wkhtmltopdf-binary gems necessary?
Error: Failed to execute: ["/.rbenv/versions/2.3.6/bin/wkhtmltopdf", "-q", "--encoding", "UTF-8", "file:///var/folders/ds/70lrh2194yb9jnwgzx28vm100000gn/T/wicked_pdf20200423-33047-47tsw2.html", "/var/folders/ds/70lrh2194yb9jnwgzx28vm100000gn/T/wicked_pdf_generated_file20200423-33047-1hbwcmu.pdf"] Error: PDF could not be generated! Command Error: The
wkhtmltopdfexecutable in the
wkhtmltopdf-binary-edgegem is being loaded, but it's also present in other gems (wkhtmltopdf-binary). If you meant to run the executable for another gem, make sure you use a project specific binstub (
bundle binstub <gem_name>). If you plan to use multiple conflicting executables, generate binstubs for them and disambiguate their names. /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/bin/wkhtmltopdf:17:in
exec': Bad CPU type in executable - /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/libexec/wkhtmltopdf-darwin-x86 (Errno::E086) from /.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/wkhtmltopdf-binary-edge-0.12.2.1/bin/wkhtmltopd`System specifications
wicked_pdf gem version: 0.11.0
wkhtmltopdf version (output of
wkhtmltopdf --version
): 0.12.5 (with patched qt)wkhtmltopdf-binary version: 0.12.4
wkhtmltopdf-binary-edge version: 0.12.2.1
platform/distribution and version: MacOS Catalina
Rails version: 4.2.1
The text was updated successfully, but these errors were encountered: