当启动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'

当前回答

我在Guard插件gem中运行Rspec时得到了这条消息,使用bundle exec Rspec。原来这是gemspec文件中缺失的一行:

$:.push File.expand_path("../lib", __FILE__)

这一行通常位于文件的顶部(在我最近工作的许多gem中),我已经将其注释掉以了解原因。

其他回答

这招对我很管用:

bundle clean --force

然后

bundle install

重新安装宝石。

仅供参考:

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

记住,如果你想使用guard,你必须在Gemfile中添加gem guard。

group :developement, :test do
  gem 'guard'
end

然后,运行

bundle install

我希望这能帮助到你。

使用打包机。调用bundle exec guard,而不是guard。

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