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

当前回答

我是通过单独运行RSpec看到这个问题的。据我所知,这意味着你的系统上安装了多个列出的gems版本,而RSpec不确定该使用哪个版本。卸载旧版本的gems后,警告就消失了。

你可以试试:

gem cleanup lumberjack

Or:

gem list lumberjack

gem uninstall lumberjack

如果你正在使用Bundler,你可以尝试bundle exec guard(或者在我的例子中是bundle exec rspec)。

其他回答

我是通过单独运行RSpec看到这个问题的。据我所知,这意味着你的系统上安装了多个列出的gems版本,而RSpec不确定该使用哪个版本。卸载旧版本的gems后,警告就消失了。

你可以试试:

gem cleanup lumberjack

Or:

gem list lumberjack

gem uninstall lumberjack

如果你正在使用Bundler,你可以尝试bundle exec guard(或者在我的例子中是bundle exec rspec)。

这招对我很管用:

bundle clean --force

然后

bundle install

重新安装宝石。

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

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

bundle clean --force

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

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

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

然后,运行

bundle install

我希望这能帮助到你。