2017-02-17 4 views
0

PDFKit::NoExecutableError (No wkhtmltopdf executable found at `/` is not writable. Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily. /home/ubuntu/rails-app/shared/bundle/ruby/2.3.0/bin/wkhtmltopdfPDFKit :: NoExecutableError 내 레일 환경 로그 파일에

wkhtmltopdf 설치하십시오 - https://github.com/pdfkit/PDFKit/wiki/Installing-WKHTMLTOPDF) : pdfkit (0.8.2)를 lib 디렉토리/pdfkit/pdfkit.rb : 32 : initialize' pdfkit (0.8.2) lib/pdfkit/middleware.rb:21:in 새로운에서 ' pdfkit (0.8.2) lib 디렉토리/pdfkit/middleware.rb : 21 :'호출 '

apt-get을 사용하여 설치를 시도했지만 오류가 계속 발생합니다.

우분투 @ 서버 : wkhtmltopdf ~ $

/home/ubuntu/.rbenv/shims/wkhtmltopdf

우분투 @ 서버 : ~ $의 wkhtmltopdf --version

wkhtmltopdf 0.12.3 (with patched qt)

답변

0

을 시도하고 새로운 만들 수 있습니다 파일 구성/이니셜 라이저/pdfkit.rb

PDFKit.configure do |config| 
    config.wkhtmltopdf = '/home/ubuntu/.rbenv/shims/wkhtmltopdf' 
end 
+0

경로를 어떻게 알 수 있습니까? 번들 쇼 wkhtmltopdf가 맞습니까? = '/home/ubuntu/rails-app/shared/bundle/ruby/2.3.0/gems/wkhtmltopdf-binary-0.12.3.1'여전히 이 – olleh

+0

작동하지 않습니다 config.wkhtmltopdf 나는 기반 wkhtmltopdf 경로를 사용 'which wkhtmltopdf on 루트 디렉토리' 이 오류가 나타났습니다 '''RuntimeError (명령 실패 (종료 상태 = 1) :/usr/bin/wkhtmltopdf --quiet --page-size 레터 - 마진 - 맨 위 0.75in - 여백 - 오른쪽 0.75in - 여백 - 최저 0.75in - 여백 - 왼쪽 0.75in - 인코딩 UTF-8 - 인쇄 매체 유형 - -) : pdfkit (0.8.2) lib/pdfkit/pdfkit.rb : 71 :'to_pdf'''' – olleh

+0

이것은 https://github.com/pdfkit/pdfkit/issues/234처럼 보입니다. –