WARN: Unresolved or ambigious specs during Gem::Specification.reset: minitest (~> 5.1)

Jeanmarie Jackman
2 min readMay 27, 2020

--

Resolving gem version issue in Ruby

While setting up my Mod1 Ruby project, I was running ‘rake -T’, and encountered the following issue:

WARN: Unresolved or ambigious specs during Gem::Specification.reset:minitest (~> 5.1)Available/installed versions of this gem:- 5.14.1- 5.13.0- 5.11.3- 5.10.1WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'Please report a bug if this causes problems.

The first thing I did, was try the suggestion in the error message:

gem cleanup minitest

After running that cleanup, I tried again to run ‘rake -T’, with the following result:

Gem::LoadError: You have already activated concurrent-ruby 1.1.6, but your Gemfile requires concurrent-ruby 1.0.5. Prepending `bundle exec` to your command may solve this.
...
(See full trace by running task with --trace)

Every bit of documentation kept pointing to run “gem cleanup <gem>”, so I ran it one more time:

Cleaning up installed gems...Attempting to uninstall minitest-5.10.1Successfully uninstalled minitest-5.10.1Clean up complete

OK! Success! or … was it…? Once again, attempted “rake -T”, but still had the Warning, but, I noticed that the version ~5.10.1 had been removed, it no longer appeared in the Warn message:

WARN: Unresolved or ambigious specs during Gem::Specification.reset:minitest (~> 5.1)Available/installed versions of this gem:- 5.14.1- 5.13.0- 5.11.3WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'Please report a bug if this causes problems.

Aha! So, ‘gem cleanup <gem>’ will remove only the last version on the list. After a bit more reading and testing to ensure that my ruby version, bundler version and gem version were compatible, I did some digging around to find out how to uninstall *all* of the versions completely, and then clean install the gem. The first method I used was this one:

bundle clean — forcebundle install

This reinstalled all of the versions that had been there, so… if this happens to you, here’s the one that finally works:

rvm @global do gem uninstall minitest

and it cleared the all versions of minitest, except -5.14.1 which solved the issue.

--

--

Jeanmarie Jackman
Jeanmarie Jackman

Written by Jeanmarie Jackman

Full Stack Developer | Software Engineer | React | Ruby on Rails | Musician | Artist | Educator

No responses yet