Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu中的Vim命令-T:Command-T.Vim无法加载C扩展_Vim - Fatal编程技术网

Ubuntu中的Vim命令-T:Command-T.Vim无法加载C扩展

Ubuntu中的Vim命令-T:Command-T.Vim无法加载C扩展,vim,Vim,我正在努力学习vim以适应我的工作。我对维姆很陌生,所以请对我宽容一点。我使用vundle安装了command-t插件。但是当我按下leader+t时,我得到以下错误: command-t.vim无法加载C扩展名 请参阅帮助中的安装和故障排除 Vim Ruby版本:1.9.3-p484 预期版本:2.2.2-p95 以下是有关我的系统的详细信息: OS:Ubuntu14在Vagrant上运行 使用Rvm安装了Ruby 2.2.2和Ruby-1.9.3-p484 gcc版本4.8.4(Ubunt

我正在努力学习vim以适应我的工作。我对维姆很陌生,所以请对我宽容一点。我使用
vundle
安装了
command-t
插件。但是当我按下
leader+t
时,我得到以下错误:

command-t.vim无法加载C扩展名
请参阅帮助中的安装和故障排除
Vim Ruby版本:1.9.3-p484
预期版本:2.2.2-p95

以下是有关我的系统的详细信息:

  • OS:Ubuntu14在Vagrant上运行
  • 使用Rvm安装了Ruby 2.2.2和Ruby-1.9.3-p484
  • gcc版本4.8.4(Ubuntu 4.8.4-2ubuntu1~14.04)
Ruby 2.2.2是我的项目的默认版本。我是否需要将Vim Ruby升级到2.2.2。如果是,那么如何在Ubuntu中升级Vim Ruby

我已经阅读了有关Stackoverflow的两个解决方案,并从plugin文件夹运行了
rake make
。但我还是犯了同样的错误

更新 下面是由
rake make
命令产生的结果

➜  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
如前所述,您需要根据Vim使用的相同版本进行构建

我认为最简单的解决方案是用ruby-1.9.3-p484重新构建插件。将此安装的路径预先添加到$path中,使用
ruby-v
检查版本,然后重新安装插件

提到可通过以下方式建立扩展:

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