Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I hit \t to use the Command-T extension in VIM, I get the error

command-t.vim could not load the C extension

I'm not sure how to go about fixing this... any suggestions?

Thanks


I am using the git-repository installation method. Here's what happens when I "rake make":

~/.vim/bundle/command-t$ rake make
(in /home/petef/.vim/bundle/command-t)
/usr/bin/ruby1.8 extconf.rb
extconf.rb:24:in `require': no such file to load -- mkmf (LoadError)
    from extconf.rb:24
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 extconf.rb...]
/home/petef/.vim/bundle/command-t/Rakefile:136
(See full trace by running task with --trace)
share|improve this question
add comment

3 Answers

up vote 10 down vote accepted

Pete, you must install ruby-dev package before invoke "rake make" command.

share|improve this answer
1  
that did the trick... thanks –  Pete Jan 2 '12 at 1:31
add comment

Command-T requires a compiled C extension to work. Here's the relevant section from the Command-T homepage on how to compile the extension:

The C extension must also be then compiled; for instance, if Vimball installs
your plugin files in ~/.vim, then you would do this: 

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

Note that Command-T requires a version of VIM with Ruby support enabled, and 
it must be compiled using the same version of Ruby that Vim itself links 
against. For more details see the documentation: 

    http://git.wincent.com/command-t.git/blob_plain/HEAD:/README.txt
share|improve this answer
    
I installed it with the git-repository method. In my command-t directory, I don't see any extconf.rb file. When I 'rake make' per the instructions, I have the same problem. –  Pete Jun 20 '11 at 3:32
    
Did you get it working, Pete? Just wandered thru this field myself -- you're probably missing the ruby-dev package on your system. Shout if you're still stuck; I'll walk you thru it. –  Tom Jun 30 '11 at 5:08
add comment

The thing that usually trips people up the most is that their Command-t has been compiled with a different version of Ruby than their Vim's version. In order do install Ruby and match the proper versions, you are going to want to install RVM and Ruby, install the correct version of Ruby, and do a rake make in the ~/.vim/bundle/Command-T plugin directory.

Here is a step-by-step guide to install Command-t.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.