我正在运行wkhtmltoimage
。我尝试安装wkhtmltoimage-binary
gem,这导致了很多问题,并阻止了lib通过ruby控制台或shell运行。一旦删除了gem,该命令就会在终端中起作用。 wkhtmltoimage --quality 100 input.html output.jpg
,但是一旦我打开Rails控制台并在cmd
或%w(cmd)
中运行它,就会出现此错误:
rubygems_integration.rb:462:in `block in replace_bin_path':
can't find executable wkhtmltoimage for gem wkhtmltoimage-binary.
wkhtmltoimage-binary is not currently included in the bundle,
perhaps you meant to add it to your Gemfile? (Gem::Exception)
为什么要检查宝石?为什么不运行它呢?我该如何解决?