Unresolved specs during Gem::Specification.reset:

后端 未结 9 1234
孤独总比滥情好
孤独总比滥情好 2020-11-29 16:47

When launching Guard, I\'m getting this output:

$ guard
WARN: Unresolved specs during Gem::Specification.reset:
             


        
相关标签:
9条回答
  • 2020-11-29 16:59

    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.

    0 讨论(0)
  • 2020-11-29 17:00

    add

    'bundle exec'
    

    before your command.

    I use ruby 2.4 and got the same problem when deploying jekyll on windows, it fixed.

    0 讨论(0)
  • 2020-11-29 17:01

    I was seeing this issue by just running RSpec on its own. From what I understand, this means that you have more than one version of the listed gems installed on your system, and RSpec is unsure which one to use. After uninstalling older version of the gems, the warnings went away.

    You can try:

    gem cleanup lumberjack
    

    Or:

    gem list lumberjack
    
    gem uninstall lumberjack
    

    If you're using Bundler, you can try bundle exec guard (or in my case bundle exec rspec).

    0 讨论(0)
  • 2020-11-29 17:04

    This worked for me:

    bundle clean --force
    

    then

    bundle install
    

    to reinstall gems.

    0 讨论(0)
  • 2020-11-29 17:06

    Using the following command solved it for me:

    bundle clean --force
    

    See guard-and-unresolved-specs for more info

    0 讨论(0)
  • 2020-11-29 17:15

    Use Bundler. Call bundle exec guard, not guard.

    0 讨论(0)
提交回复
热议问题