Rubygems: Make "Unresolved specs during Gem::Specification.reset" warning more useful

Created on 7 Jun 2017  路  27Comments  路  Source: rubygems/rubygems

"WARN: Unresolved specs during Gem::Specification.reset" is not very useful - it appears without mentioning what requested given gem version and it appears in situation where wanted gem version is available.

$ rspec spec/case_insensitive_parser_spec.rb 
WARN: Unresolved specs during Gem::Specification.reset:
      diff-lcs (< 2.0, >= 1.2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

despite that

$ gem list | grep lcs
diff-lcs (1.3, 1.2.5)

It was already reported as #1350, but it was closed by reporter despite lack of change.


I'm having a problem or would like to suggest a feature.

My current problem is confusing error message.

This issue is related to:

  • [ ] Network problems
  • [ ] Installing a library
  • [ ] Publishing a library
  • [ ] The command line gem
  • [X] Other

Here are my current environment details:

$ gem env version
2.6.12

I will abide by the code of conduct.

feature request

Most helpful comment

I used bundle clean --force and then ran bundle install to reinstall gems. Fixed the issue here.

All 27 comments

https://stackoverflow.com/questions/17936340/unresolved-specs-during-gemspecification-reset claims

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 to use.

Is it a correct interpretation? If yes, then maybe "Unresolved specs as multiple gem versions match spec" would be more useful?

I had the exactly same issue. I cleaned up all diff-lcs versions and then bundled again and it worked.
A more specific message would be much more helpful and less stressful.

Can you tell us how you found all the diff-lcs versions?

$ gem uninstall diff-lcs
then choose to uninstall all versions

I used bundle clean --force and then ran bundle install to reinstall gems. Fixed the issue here.

Related also to #1070 found by other googling.

I get:

WARN: Unresolved specs during Gem::Specification.reset:
      CFPropertyList (< 4.0, >= 2.3.3)
WARN: Clearing out unresolved specs.

and no solution from here fixed it.

I run rake db:migrate got this error please help me

WARN: Unresolved specs during Gem::Specification.reset:
minitest (~> 5.1)
WARN: Clearing out unresolved specs.

I used bundle clean --force and then ran bundle install to reinstall gems. Fixed the issue here.

Thanks it worked

I run "msfconsole" and got this error pls help me..

WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
reline (>= 0)
Available/installed versions of this gem:
- 0.1.5
- 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup '

It has already mentioned that try 'gem cleanup' try running that command

It has already mentioned that try 'gem cleanup' try running that command

still i get error.
even i uninstall and install it though it gives error

I used bundle clean --force and then ran bundle install to reinstall gems. Fixed the issue here

I used bundle clean --force and then ran bundle install to reinstall gems. Fixed the issue here

root@kali:~# bundle clean --force
Could not locate Gemfile or .bundle/ directory

getting this error all time. I tried my possible way.
Any suggestion??

This was for Windows, don't have idea for kali Linux

This was for Windows, don't have idea for kali Linux

No problem. thanks for help.

Maybe you should try removing the gem which is causing you problem

Maybe you should try removing the gem which is causing you problem

i tried but still getting error

I'm sorry you're having issues, how did you install msfconsole?

I'm sorry you're having issues, how did you install msfconsole?

Pre-installed with kali linux OS.
Now it's resolve but sometimes it gives same error. Don't know why.

Weird... If it's causing issues, they should happen every time, not intermittently :thinking:.

I got the same issue on the latest Kali Linux:

WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
reline (>= 0)
Available/installed versions of this gem:
- 0.1.5
WARN: Clearing out unresolved specs. Try 'gem cleanup '
Please report a bug if this causes problems.

Is there any chance you could provide a Dockerfile using msfconsole on Kali Linux where this issue can be observed?

Weird... If it's causing issues, they should happen every time, not intermittently 馃.

Yes, so strange. I think its because of virtual machine. I am running kali on vmware pro. So i think its issue.

I got the same issue on the latest Kali Linux:

WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
reline (>= 0)
Available/installed versions of this gem:

  • 0.1.5
    WARN: Clearing out unresolved specs. Try 'gem cleanup '
    Please report a bug if this causes problems.

use apt update and apt upgrade. My problem solve with this only but not completely solved. Sometimes it gives same error.

This happened to me after an upgrade.
Here's a fix for that warning:
First remove any default reline gems:
sudo rm /usr/lib/ruby/gems/2.7.0/specifications/default/reline-0.1.*

Then install the current default reline version(0.1.3) that works fine with Metasploit, and set it to the default reline:
sudo gem install reline --default -v 0.1.3

You should be good now.

Was this page helpful?
0 / 5 - 0 ratings