Unresolved specs during Gem::Specification.reset:

2019-01-08 04:34发布

When launching Guard, I'm getting this output:

$ 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.

What does this mean, and how do I fix it?

Contents of Guardfile:

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

9条回答
成全新的幸福
2楼-- · 2019-01-08 04:48

I use gem list gem-name; gem uninstall gem-name to clean the gem one by one because of the dependency. After that, the error does not show again.

查看更多
你好瞎i
3楼-- · 2019-01-08 04:51

I was getting this message while running Rspec within a Guard plugin gem, using bundle exec rspec. It turned out to be a missing line in the gemspec file:

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

This line is normally at the top of the file (in many of the gems I have recently been working in) and I had commented it out to see why.

查看更多
啃猪蹄的小仙女
4楼-- · 2019-01-08 04:52

Remember, if you want to use guard, you have to add gem guard to Gemfile.

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

Then, run

bundle install

I hope this can help you.

查看更多
虎瘦雄心在
5楼-- · 2019-01-08 04:56

Using the following command solved it for me:

bundle clean --force

See guard-and-unresolved-specs for more info

查看更多
爷的心禁止访问
6楼-- · 2019-01-08 04:56

Use Bundler. Call bundle exec guard, not guard.

查看更多
乱世女痞
7楼-- · 2019-01-08 05:02

This worked for me:

bundle clean --force

then

bundle install

to reinstall gems.

查看更多
登录 后发表回答