Reputation: 520
I'm trying to install Command-T for Vim, but no success so far.
I reinstalled vim using brew and the ruby version for vim is 2.5.1
I installed ruby 2.5.1 using RVM, I ran ruby ruby extconf.rb, I got this output
checking for float.h... yes
checking for ruby.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for fcntl.h... yes
checking for stdint.h... yes
checking for sys/errno.h... yes
checking for sys/socket.h... yes
checking for ruby/st.h... yes
checking for st.h... yes
checking for pthread_create() in -lpthread... yes
creating Makefile
then I ran make and got it:
compiling ext.c
compiling heap.c
compiling match.c
compiling matcher.c
compiling watchman.c
linking shared-object ext.bundle
But when I try to use it on my vim, I got the following message:
command-t.vim could not load the C extension.
Please see INSTALLATION and TROUBLE-SHOOTING in the help.
Vim Ruby version: 2.5.1-p57
For more information type: :help command-t
If I use ruby version 2.5.0 to compile, the message says that I got the wrong version of ruby.
I have no idea what else I could do, please help me
Upvotes: 4
Views: 687
Reputation: 803
The problem is that you have to compile command-t C extension with the same ruby as vim compiled.
You mention that you are using RVM and that vim compiled with ruby 2.5.1-p57. You need to choose exact same ruby. If you compile (in your case installed with brew) vim with ruby 2.5.1-p57 from RVM then run command:
$ rvm use 2.5.1-p57
Then recompile command-t, make sure ruby -v
returns 2.5.1-p57:
$ ruby -v
$ ruby extconf.rb
$ make
If this doesn't helps, probably you installed it with system wide ruby with the same 2.5.1 version. This can solve the issue:
$ rvm use system
$ ruby extconf.rb
$ make
The idea to compile command-t with the same version of ruby as vim compiled.
In worse case scenario you can reinstall vim.
Also you can reference the command-t docs
Upvotes: 6