命令在终端中运行,但不能在带有%w(cmd)或`cmd`的rails控制台中运行

时间:2018-10-11 17:04:42

标签: ruby-on-rails ruby

我正在运行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)

为什么要检查宝石?为什么不运行它呢?我该如何解决?

0 个答案:

没有答案