Compiling vim with ruby

2019-08-20 09:16发布

I trying to compile vim on my Mac Osx 10.7.3 i got this Error

./configure --enable-rubyinterp 
make 

ld: library not found for -lruby.1.9.1
collect2: ld returned 1 exit status
make[1]: *** [vim] Error 1
make: *** [first] Error 2

Did anyone know how i can install this lib?

2条回答
Anthone
2楼-- · 2019-08-20 09:56

I use Homebrew to get various Unix utilities on my mac. It compiles from source, so if it doesn't have ruby support by default, you can fairly easily change the build script to add it. It makes installing and (especially) managing/upgrading much easier.

查看更多
Animai°情兽
3楼-- · 2019-08-20 10:14

Don't.

MacVim has ruby support (and more) built in and comes with both the GUI, a CLI wrapper and a CLI executable.

My version (snapshot 61) is 8 months old or so and it has worked without any problem through 3 ruby upgrades.

EDIT

For the record, MacVim is distributed with:

  • mvim, a CLI wrapper that makes it possible to launch MacVim (GUI) from a terminal.
  • /path/to/MacVim.app/Contents/MacOS/Vim, a CLI executable that you can run in the terminal.

The CLI executable has been built with the same bells and whistles as the GUI and thus makes it totally useless to build your own vim on Mac OS X. In most cases.

To use it in a terminal ($ vim file.tx), you only need to add an alias to your ~/.profile/~/.bashrc:

alias vim='/path/to/MacVim.app/Contents/MacOS/Vim'

or add /path/to/MacVim.app/Contents/MacOS to your path.

The whole process doesn't take more than a minute.

查看更多
登录 后发表回答