Vim Command-T plugin error: C could not be loaded

I am trying to install the Command-T plugin.

I compiled vim following the instructions in this comment: Installing vim with ruby ​​support (+ ruby)

So now there is a + ruby ​​flag, but still, when I try to use the plugin, I get this error:

command-t.vim could not load the C extension Please see INSTALLATION and TROUBLE-SHOOTING in the help For more information type: :help command-t 

I have a ruby ​​in my system:

 > ruby -v > ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] 

offers?

+48
ruby vim plugins
Oct 27 2018-11-22T00:
source share
8 answers

Go to the plugin directory and run the following command:

 rake make 

It compiles the plugin extension you need.

+80
Oct 28 2018-11-11T00:
source share

I encountered the same error, but after reading the manual in a little more detail, I found the following message.

Marked in the INSTALL section in https://github.com/wincent/Command-T

Then you need to create a C extension that you can make from the shell. if you use typical | 'runtimepath' | then the files were installed inside ~ / .vim and you can build the extension with:

  cd ~/.vim/ruby/command-t ruby extconf.rb make 
+26
Feb 06 2018-12-12T00:
source share

You must build using the same version of Ruby that Vim is associated with.

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

You can then get your shell back using rbenv shell --unset .

+4
Mar 16 2018-12-12T00:
source share

On debian squeeze, I also had to install the json library for ruby ​​with apt-get install libjson-ruby1.8

+2
Mar 03 '14 at 23:26
source share

Command-T requires a compiled component. The error message assumes that you have not completely followed the installation instructions for the plugin.

+1
Oct 27 '11 at 10:40
source share

Read the installation instructions: https://github.com/wincent/Command-T Find the heading “INSTALLATION” on this page. You most likely have not followed the instructions of this official README. If you use RVM, be sure to use the system ruby. All this is noted in the documents.

+1
Oct 27 2018-11-23T00:
source share

If you are sure that you are following the instructions of the github project , you may need to restart vim and terminal. I ran into the same problem, and when I restarted Vim, it will finally work!

+1
Nov 01
source share

I got a similar error and tried rake make as suggested in one of the answers that ruby extconf.rb also runs, I got the following error

 ─$ rake make /usr/bin/ruby2.3 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h rake aborted! Command failed with status (1): [/usr/bin/ruby2.3 extconf.rb...] /home/shreedhan/.vim/bundle/command-t/Rakefile:84:in `block (2 levels) in <top (required)>' /home/shreedhan/.vim/bundle/command-t/Rakefile:83:in `chdir' /home/shreedhan/.vim/bundle/command-t/Rakefile:83:in `block in <top (required)>' Tasks: TOP => make (See full trace by running task with --trace) 

You need to install ruby-devel or ruby-dev based on whether you have yum or apt in your distribution.

 yum install ruby-devel 

or

 $ apt install ruby-dev 
0
Jul 28 '17 at 20:30
source share



All Articles