我得到了pdfkit安裝,甚至設置了wkhtmltopdf安裝,但是我每次嘗試創建PDF時都會收到以下錯誤。無法使用pdfkit創建PDF - PDFKit :: NoExecutableError
PDFKit::NoExecutableError
No wkhtmltopdf executable found at bundler: command not found: which
Install missing gem executables with `bundle install`
>> Please install wkhtmltopdf - https://github.com/jdpace/PDFKit/wiki/Installing-WKHTMLTOPDF
我的Gemfile有以下幾點:
gem 'jquery-rails'
gem 'devise'
gem 'carrierwave'
gem "wkhtmltopdf"
gem 'pdfkit'
我的application.rb中有如下條目:
config.middleware.use "PDFKit::Middleware", :print_media_type => true
我失去了一些東西在這裏 - 我已經運行一個安裝包但每次嘗試創建PDF時仍會出現此錯誤。請幫助
windows?大聲笑:)從http://code.google.com/p/wkhtmltopdf/downloads/list下載wkht ..並安裝它。然後將您的安裝路徑放入pdfkit.rb – fl00r 2012-03-07 13:24:47
當使用AWS elastic beanstalk和'gem install wkhtmltopdf'時,將'config.wkhtmltopdf'設置爲'/ opt/rubies/ruby-2.2.4/bin/wkhtmltopdf''。意思是我沒有設置容器命令來在我的EC2實例上安裝wkhtmltopdf ...謝謝 – 2016-07-05 09:17:55
檢查最後的評論...我的意思是'gem install wkhtmltopdf-binary' – 2016-07-05 09:25:44