Skip to content

ruby 3.1.2, using rbenv, ubuntu 22.04 #147

Open

Description

@ashrafalzyoud
$ 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

Activity

  1. roostinghawk commented on Oct 28, 2022

    @roostinghawk

    Same issue:#142

  2. johnhailu commented on Nov 15, 2022

    @johnhailu
    Contributor

    #150 will fix it after pull request approval.

  3. dchuquilla commented on Jul 4, 2024

    @dchuquilla

    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

  4. johnhailu commented on Jul 4, 2024

    @johnhailu
    Contributor

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions