Vim插件“命令t”抛出错误

时间:2015-02-05 19:02:21

标签: ruby vim plugins vim-plugin

我是Vim新手,刚刚使用Command T安装了vundle插件。当我想在Vim中使用它时出现以下错误

Error detected while processing function commandt#CommandTShowFileFinder:
line    2:
LoadError: /Users/xafar/.vim/bundle/command-t/ruby/command-t/finder.rb:4:in `require': no such file to load -- command-t/ext

我的mac os x上有ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]的ruby版Mavericks

如何解决此问题?

1 个答案:

答案 0 :(得分:1)

只需从Vundle安装Command-T就无法正常运行。它仍然需要编译。

From the Command-T install guide -

Compiling Command-T ~

The C extension must be built, which can be done from the shell. If you use a
typical Pathogen, Vundle or NeoBundle set-up then the files were installed inside
`~/.vim/bundle/command-t`. A typical VAM installation path might be
`~/.vim/vim-addons/command-t`.

Wherever the Command-T files were installed, you can build the extension by
changing to the `ruby/command-t` subdirectory and running a couple of commands
as follows:

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

Note: If you are an RVM or rbenv user, you must build CommandT using the same
version of Ruby that Vim itself is linked against. You can find out the
version that Vim is linked against by issuing following command inside Vim:

  :ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"