r3b00t
r3b00t

Reputation: 7533

Vim Command-T in Ubuntu: command-t.vim could not load the C extension

I am trying to learn vim for my job. I am very new to vim so please go easy on me. I installed command-t plugin using vundle. But when I press leader + t I get following errors:

command-t.vim could not load the C extension
Please see INSTALLATION and TROUBLE-SHOOTING in the help
Vim Ruby version: 1.9.3-p484
Expected version: 2.2.2-p95

Below are details about my system:

Ruby 2.2.2 is my default version for my project. Do I need to upgrade Vim Ruby to 2.2.2. If yes then how can I upgrade Vim Ruby in Ubuntu.

I already read couple of solution on Stackoverflow and run rake make from plugin folder. But still I am getting the same error.

Update

Below are result from rake make command

➜  command-t git:(master) rake make
/home/vagrant/.rvm/rubies/ruby-2.2.2/bin/ruby extconf.rb
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
compiling watchman.c 
compiling ext.c
compiling match.c
compiling matcher.c
linking shared-object ext.so

Upvotes: 2

Views: 572

Answers (2)

Qi Fan
Qi Fan

Reputation: 827

The README mentions that the extension can be built by:

cd ~/.vim/bundle/command-t/ruby/command-t/ext/command-t
ruby extconf.rb
make

Upvotes: 2

Jonas
Jonas

Reputation: 1031

As mentioned here, you need must build against the same version as used by Vim.

I think the easiest solution will be rebuilding the plugin with ruby-1.9.3-p484. Prepend the path to this installation to your $PATH, check the version with ruby -v and reinstall the plugin.

Upvotes: 1

Related Questions