zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
184 stars 346 forks source link

ruby 3.1.2, using rbenv, ubuntu 22.04 #147

Open ashrafalzyoud opened 2 years ago

ashrafalzyoud commented 2 years ago
$ wkhtmltopdf --version
/home/redmine/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wkhtmltopdf-binary-0.12.6.5/bin/wkhtmltopdf:61:in `<top (required)>': Invalid platform, must be running on Ubuntu 16.04/18.04/20.04 CentOS 6/7/8, Debian 9/10, archlinux amd64, or intel-based Cocoa macOS (missing binary: /home/redmine/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/wkhtmltopdf-binary-0.12.6.5/bin/wkhtmltopdf_ubuntu_22.04_amd64). (RuntimeError)
    from /home/redmine/.rbenv/versions/3.1.2/bin/wkhtmltopdf:25:in `load'
    from /home/redmine/.rbenv/versions/3.1.2/bin/wkhtmltopdf:25:in `<main>'

not working by gem wkhtmltopdf_exe_path: '/home/redmine/.rbenv/shims/wkhtmltopdf' if im install it by apt its working wkhtmltopdf_exe_path: '/usr/bin/wkhtmltopdf

roostinghawk commented 2 years ago

Same issue:https://github.com/zakird/wkhtmltopdf_binary_gem/issues/142

johnhailu commented 2 years ago

150 will fix it after pull request approval.

dchuquilla commented 4 months ago

please tell me how you fixed this because the ubuntu_22.04_arm64 binary is missing, how can I compile that one?

For the moment I downloaded de DEB file, installed manually and created a symlink for the bin I need

# download
wget http://ports.ubuntu.com/pool/universe/w/wkhtmltopdf/wkhtmltopdf_0.12.6-2_arm64.deb

# install
sudo dpkg -i wkhtmltopdf_0.12.6-2_arm64.deb

# symlink
cd /path/to-my/app-folder/shared/bundle/ruby/3.1.0/gems/wkhtmltopdf-binary-0.12.6.7/bin/
ln -s /usr/bin/wkhtmltopdf wkhtmltopdf_ubuntu_22.04_arm64

Then I finally passed that missing

johnhailu commented 4 months ago

Hello @dchuquilla

U don't have to install it on your system.

  1. Download the deb file
  2. dpkg -x wkhtmltox_#.deb .
  3. Then compress the binary u get from step 2
  4. Add it to the gem, update tests
  5. Make a PR

This was roughly the steps i followed

Peace