配置wicked_pdf.rb:
WickedPdf.config = {
exe_path: ‘/usr/local/bin/wkhtmltopdf’
}
sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-i386.deb
sudo apt-get install xfonts-base
sudo apt-get install ttf-wqy-zenhei #这两个是用来render中文的
参考:
http://stackoverflow.com/questions/17557064/wicked-pdf-does-not-run-on-ubuntu-server-wkhtmltopdf-cannot-connect-to-x-serv
http://deveede.logdown.com/posts/256349-wicked-in-pdf-htmlphppdfutf-word-processing