Unresolved specs during Gem::Specification.reset:
RubyRubygemsGuardRuby Problem Overview
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'
Ruby Solutions
Solution 1 - Ruby
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
).
Solution 2 - Ruby
Using the following command solved it for me:
bundle clean --force
See guard-and-unresolved-specs for more info
Solution 3 - Ruby
Use Bundler. Call bundle exec guard
, not guard
.
Solution 4 - Ruby
FYI:
gem cleanup
worked for me.
$ 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
Solution 5 - Ruby
This worked for me:
bundle clean --force
then
bundle install
to reinstall gems.
Solution 6 - Ruby
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.
Solution 7 - Ruby
add
'bundle exec'
before your command.
I use ruby 2.4 and got the same problem when deploying jekyll on windows, it fixed.
Solution 8 - Ruby
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.
Solution 9 - Ruby
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.
Solution 10 - Ruby
If anyone has come this far and still hasn't found the answer I leave you with this. gem update --system
. I tried all of these other answers to no avail. Hopefully this works for you.
Solution 11 - Ruby
Try gem uninstall <gem>
and it will remove all younger versions of gem.
You will then be asked
> "If you remove this gem, these dependencies will not be met. Continue > deleting? [YN]"
Select the answer
> "no"
to leave the latest version of gem and all dependencies remain valid.