Reputation: 2127
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?
Upvotes: 1
Views: 750
Reputation: 56129
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.
Upvotes: 0
Reputation: 7657
I configured Vim with Ruby interface by using these options:
$ configure --with-features=huge --enable-terminal --enable-gui=gtk3 --enable-rubyinterp=dynamic --with-ruby-command=ruby2.7.2
I needed to include both --enable-rubyinterp=dynamic
and --with-ruby-command=ruby2.7.2
to enable the Ruby interface.
To verify the build:
$ vim --version | egrep -o '\S*ruby\S*'
+ruby/dyn
Upvotes: 0
Reputation: 196876
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.
Upvotes: 5