vim ruby mismatch on Mac High Sierra

user2960993 picture user2960993 · Nov 14, 2017 · Viewed 12.6k times · Source

I recently upgraded my Mac to High Sierra

After the upgrade, Macvim (mvim) stopped working because (I assume) HighSierra upgraded ruby to 2.3, and mvim is using ruby 2.0.

Following is the error I am getting

dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib

Referenced from: /usr/local/Cellar/macvim/8.0-134/MacVim.app/Contents/bin/../MacOS/Vim

Do I need to compile vim again or is there any way to fix this problem?

Thanks in advance.

Answer

Bruce Edge picture Bruce Edge · Nov 14, 2017

This worked for me. YMMV brew uninstall --purge macvim brew install macvim

[amended] Regarding the upgrade alone option, that may work if you don't have the current version already. The --purge forces a removal and complete reinstall. Also, the build from source option, while it may work, you now own your own mac-vim static snapshot and need to maintain it manually as the app evolves. I'd avoid building from source unless you have very specific needs.