“dyld: Library not loaded”, “libruby.1.9.1.dylib”

2019-02-16 19:38发布

问题:

I'm trying to open my rails project into mvim (macvim) using "mvim ." but I get the following error.

➜  cs193p git:(master) mvim .
dyld: Library not loaded: /Users/myusername/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib
  Referenced from: /usr/local/Cellar/macvim/7.3-64/MacVim.app/Contents/MacOS/Vim
  Reason: image not found
[1]    85219 trace trap  mvim .
➜  cs193p git:(master) mvim --version
dyld: Library not loaded: /Users/myusername/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib
  Referenced from: /usr/local/Cellar/macvim/7.3-64/MacVim.app/Contents/MacOS/Vim
  Reason: image not found

I recently removed RVM ("rvm implode" which included ruby 1.9.3-p125) and reinstalled 1.9.3-p194. What do I need to do to fix this?

Thank you

回答1:

brew will compile MacVim against your currently active ruby which was probably 1.9.3-p125. rvm use 1.9.3-p194 --default && brew uninstall macvim && brew install macvim is probably your best bet to fix your problem.