Vim Command-T plugin error: could not load the C extension Vim Command-T plugin error: could not load the C extension ruby ruby

Vim Command-T plugin error: could not load the C extension


Go to plugin dir and run the following command:

rake make

It compiles the plugin extension you need.


I ran into the same error but after reading the manual a bit more thorough I found the following helpful.

Tagged from the INSTALLATION section in https://github.com/wincent/Command-T

The C extension must then be built, which can be done from the shell. If youuse a typical |'runtimepath'| then the files were installed inside ~/.vim andyou can build the extension with:

cd ~/.vim/ruby/command-t/ext/command-truby extconf.rbmake


You must perform the build using the same version of Ruby that Vim itself is linked against.

Are you using RVM or rbenv? Personally, I was using rbenv and MacVim. I had this error because I was trying use ruby 1.8.7 patch 352. I switched back to 1.8.7 patch 249 using rbenv shell system before running ruby extconf.rb and make, then everything worked fine.

Afterwards, you can revert your shell back using rbenv shell --unset.