当启动Guard时,我得到这样的输出:

$ guard
WARN: Unresolved specs during Gem::Specification.reset:
      lumberjack (>= 1.0.2)
      ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

这意味着什么?我该如何解决?

Guardfile的内容:

guard 'livereload' do
    watch(%r{.+\.(css|js|html)$})
end
guard 'sass', :input => 'css', :style => :compressed, :extension => '.min.css'

当前回答

这招对我很管用:

bundle clean --force

然后

bundle install

重新安装宝石。

其他回答

add

'bundle exec'

在你的命令之前。

我使用ruby 2.4,在windows上部署jekyll时也遇到了同样的问题,它修复了。

仅供参考:

gem cleanup

为我工作。

$ gem cleanup       

Cleaning up installed gems...
Attempting to uninstall builder-3.2.2
Successfully uninstalled builder-3.2.2
Attempting to uninstall amatch-0.3.0
Successfully uninstalled amatch-0.3.0
Attempting to uninstall tins-1.12.0
Successfully uninstalled tins-1.12.0
Clean Up Complete

尝试gem uninstall <gem> 它将删除所有年轻版本的gem。

然后你会被问到

如果你删除了这个宝石,这些依赖关系就不满足了。继续 删除吗?(YN)”

选择答案

“不”

保留最新版本的gem,并且所有依赖项仍然有效。

我使用宝石列表宝石名;由于依赖关系,需要逐个卸载Gem -name来清理Gem。之后,错误将不再显示。

使用以下命令为我解决了这个问题:

bundle clean --force

有关更多信息,请参阅守卫和未解决的规格