无法在 Windows 中运行 PDFKIT 命令
我正在关注这个教程,但在Windows中。当我从我的应用程序目录运行时
pdfkit --install-wkhtmltopdf
,无法识别 pdfkit
命令:
'pdfkit' is not recognized as an internal or external command,
operable program or batch file.
gem list
显示我确实安装了 pdfkit
gem:
pdfkit (0.5.0)
什么可能是问题所在?
I am following this tutorial, but in Windows. When I run:
pdfkit --install-wkhtmltopdf
from my application directory, the pdfkit
command is not recognized:
'pdfkit' is not recognized as an internal or external command,
operable program or batch file.
gem list
shows that I do have the pdfkit
gem installed:
pdfkit (0.5.0)
What could be the problem ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法运行该命令的原因是,自 2010 年 8 月(您提到的博客文章撰写时)以来,gem 已发生更改。如果您查看源代码,您会发现根本没有二进制文件,因此运行pdfkit 安装命令将不起作用。要安装 wkhtmltopdf (这就是该命令尝试执行的操作),我建议按照此处的说明进行操作。有关使用新 pdfkit gem 的完整说明,我将遵循这些说明。
The reason you can't run the command is because the gem has changed since August 2010, when the blog post you mention was written. If you take a look at the source code you'll see that there are no binaries at all, so running a pdfkit install command will not work. To install wkhtmltopdf (which is what that command is attempting to do) I would recommend following the instructions here. For full instructions on using the new pdfkit gem I would follow these instructions.