vim not working after upgrading to mac os x 10.13.1 high sierra

I upgraded to mac os high sierra 10.13.1, and now when I try to run vim, I get this message.

dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib Referenced from: /usr/local/bin/vim Reason: image not found Abort trap: 6

What might I need to do to get vim working again?

I believe I have xcode installed, and also brew, the missing package manager for mac os, if that helps.


Solution 1:

Did you install vim with homebrew?

Update homebrew and vim.
brew update
brew upgrade vim

(I'd recommend upgrading everything installed with homebrew brew upgrade - but be ready for things to break.)

You might also need to unlink and re-link vim.

On a 2nd look, it looks like it's due to broken ruby, only re-linking ruby might fix it, but upgrade is still a good idea. brew link --overwrite ruby

My homebrew packages often get broken by a macOS upgrade, it seems best to upgrade everything at the same time.

Solution 2:

Previous answers did not work for me. (did not try installing from source, didn't want to "own" my macvim at that level)

This did work: brew uninstall --purge macvim brew install macvim

Solution 3:

All that stuff didn't quite work for me.

But uninstalling and reinstalling Vim worked.

brew uninstall vim
brew install vim