我刚把我的OS X系统升级到Sierra 10.12.6。当我打开vim并尝试使用command-t时,出现以下错误:
command-t.vim could not load the C extension.
Please see INSTALLATION and TROUBLE-SHOOTING in the help.
Vim Ruby version: 2.5.0-p0
Expected version: 2.4.1-p111
For more information type: :help command-t
以下是导致我当前世界状态的步骤:
1. brew uninstall ruby vim
=> brew install ruby vim
我尝试了以下stackoverflow和github问题中的建议:
- Vim Command-T插件错误:无法加载C扩展
- https://github.com/wincent/command-t/issues/214
- https://github.com/wincent/command-t/issues/196
- https://github.com/wincent/command-t/issues/275
- https://github.com/wincent/command-t/issues/119
- https://github.com/wincent/command-t/issues/271
- https://github.com/wincent/command-t/issues/242
- https://askubuntu.com/questions/49469/command-t-vim-could-not-load-c-extension
- https://wincent.com/forums/command-t/topics/427
当然,还有关于command-t的文档:(https://github.com/wincent/command-t/blob/master/doc/command-t.txt)。不幸的是,这些示例大多过时,并且与最新的MacOS、Ruby或Vim版本无关。我的ruby extconf.rb
路径与示例略有不同...
示例中extconf.rb
所在路径:
cd ~/.vim/bundle/command-t/ruby/command-t
我的电脑上的路径:
cd ~/.vim/bundle/command-t/ruby/command-t/ext/command-t
任何建议都非常感激。