vim ruby mismatch on Mac High Sierra
This worked for me. YMMVbrew uninstall --purge macvimbrew 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.
First find where is the right libruby path, mine is: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.2.3.0.dylib
It is common that the version has changed.
Find out where the absolute path of vim is:
$ which vimvim: aliased to your-path-of-vim
change dyld:
sudo install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.2.3.0.dylib your-path-of-vim
➜ ~ vimdyld: 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
I tried brew uninstall install update... All failed. And install_name_tool
works for me.
install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.2.3.0.dylib /usr/local/bin/vim