2

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:

  • OS: Ubuntu 14 running on Vagrant
  • installed Ruby 2.2.2 and ruby-1.9.3-p484 using Rvm.
  • gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

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
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
r3b00t
  • 6,953
  • 6
  • 27
  • 37

2 Answers2

2

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
Qi Fan
  • 809
  • 1
  • 10
  • 27
1

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.

Community
  • 1
  • 1
Jonas
  • 1,021
  • 11
  • 17