On both my work and home computers, I recently upgraded Ruby to 2.3.1, using ruby-install
. I use chruby
as my Ruby switcher.
I started seei
I had the same issue and I'm using rbenv. For some reason my global rbenv setting went missing. In order to fix this problem I set the global version to one of my rbenv versions... for instance:
rbenv global 2.5.1
I came across this exact issue today - getting warnings like this for gems that weren't even installed!
... Well, it turns out the gems were installed - for a different ruby than the one I had set active with chruby (2.2.3 vs 2.3.1).
Switching to all the different rubies and running gem pristine --all
on all of them solved the problem.
If you have installed RVM, possible you're catching the error because you have installed different versions.
Check and remove useless versions, but I think this is not good approach. Anyway errors gone.
rvm list
rvm use ruby-version
rvm remove ruby-useless-version
After refresh cocoapods, it should be injected in .rvm GEM_HOME
gem uninstall cocoapods
gem install cocoapods
Probably pod COMMAND
will throw the error about minitest
gem, so – gem install minitest
Running gem pristine --all
didn't help at first, but then I realized: the script I was running began with the line:
#!/usr/bin/ruby
On my macOS system (Catalina, but I don't think it matters), this points to the Ruby that came with the system, not the one installed by RVM. Running gem pristine --all
was fixing up the RVM installation, but my script was calling a different version of Ruby.
The fix for me was to use the env
command to call whichever Ruby is specified in the current shell's PATH
. Changing the top line of the script to this fixed it:
#!/usr/bin/env ruby
I did everything mentioned above including
but the issue was the same for me. I just rebooted my Mac as the last hope, and the warning messages are disappeared.
Weird, but if anyone's struggling with this issue after trying everything on StackOverflow, try reboot your machine.
Uninstall and reinstall of Vagrant also works. There's an unistall.tool
bash script included in the installer .dmg image that will remove Vagrant.
Found this solution here: Updating Vagrant and Gems Extentions Not Built In