对wkhtmltopdf bin的权限被拒绝

时间:2019-01-03 13:29:53

标签: ruby-on-rails ubuntu nginx rvm wkhtmltopdf

我在尝试生成PDF文件时得到Error: Permission denied - /home/ubuntu/.rvm/gems/ruby-2.5.0@rade/bin/wkhtmltopdf)

我需要在Rails应用程序中生成PDF文件。我使用的wicked_pdf取决于wkhtmltopdf二进制文件。我尝试了777权限(仅用于测试),但没有结果...我的RVM运行良好,使用正确的Ruby版本指向正确的gemset ...

ls -la /home/ubuntu/.rvm/gems/ruby-2.5.0@rade/bin

drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 3 12:32 . drwxrwxr-x 11 ubuntu ubuntu 4096 Dec 28 17:24 .. -rwxr-xr-x 1 ubuntu ubuntu 616 Dec 28 17:23 byebug -rwxr-xr-x 1 ubuntu ubuntu 620 Dec 28 17:23 cnpj -rwxr-xr-x 1 ubuntu ubuntu 618 Dec 28 17:23 cpf -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:23 haml -rwxr-xr-x 1 ubuntu ubuntu 616 Dec 28 17:23 listen -rwxr-xr-x 1 ubuntu ubuntu 646 Dec 28 17:24 mailcatcher -rwxr-xr-x 1 ubuntu ubuntu 628 Dec 28 17:23 nokogiri -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:24 puma -rwxr-xr-x 1 ubuntu ubuntu 610 Dec 28 17:24 pumactl -rwxr-xr-x 1 ubuntu ubuntu 608 Dec 28 17:23 rackup -rwxr-xr-x 1 ubuntu ubuntu 634 Dec 28 17:24 railroady -rwxr-xr-x 1 ubuntu ubuntu 622 Dec 28 17:23 rails -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:22 rake -rwxrwxr-x 1 ubuntu ubuntu 644 Dec 28 17:22 ruby_executable_hooks -rwxr-xr-x 1 ubuntu ubuntu 616 Dec 28 17:24 spring -rwxr-xr-x 1 ubuntu ubuntu 634 Dec 28 17:24 sprockets -rwxr-xr-x 1 ubuntu ubuntu 652 Dec 28 17:24 sqlite3_ruby -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:23 thin -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:23 thor -rwxr-xr-x 1 ubuntu ubuntu 604 Dec 28 17:23 tilt -rwxr-xr-x 1 ubuntu ubuntu 628 Dec 28 17:24 whenever -rwxr-xr-x 1 ubuntu ubuntu 634 Dec 28 17:24 wheneverize -rwxrwxrwx 1 ubuntu ubuntu 718 Dec 29 20:26 wkhtmltopdf

这是完整的错误消息

RuntimeError (Failed to execute: ["/home/ubuntu/.rvm/gems/ruby-2.5.0@rade/bin/wkhtmltopdf", "-q", "--viewport-size", "1280x1024", "--zoom", "0.78125", "--javascript-delay", "2000", "--margin-left", "0", "--margin-right", "0",[...] App 13255 output: Error: Permission denied - /home/ubuntu/.rvm/gems/ruby-2.5.0@rade/bin/wkhtmltopdf):

0 个答案:

没有答案