After completing all the installation steps for the CommandT plugin, I get the error command-t.vim could not load the C extension at startup. The ComamndT troubleshooting section provides the following recommendations:
If a problem occurs the first thing you should do is inspect the output of: ruby extconf.rb make During the installation, and: vim
And indeed, it seems to me that there is a mismatch.
Exiting make suggests that cygwin gcc uses ruby ββ1.8:
gcc -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/1.8/i386-cygwin -I. -DHA VE_RUBY_H -g -O2 -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c gcc -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/1.8/i386-cygwin -I. -DHA VE_RUBY_H -g -O2 -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c gcc -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/1.8/i386-cygwin -I. -DHA VE_RUBY_H -g -O2 -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c gcc -shared -s -o ext.so ext.o match.o matcher.o -L. -L/usr/lib -L. -Wl,--enabl e-auto-image-base,--enable-auto-import,--export-all -lruby -ldl -lcrypt
Exiting vim :version contains this output:
-DDYNAMIC_RUBY_VER=191 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby191.dll\"
The troubleshooting guide suggests using a combination of Vim 7.2, Ruby 1.8.7-p299 and DevKit 3.4.5r3-20091110. However, this is not a good solution for me for a number of reasons:
- I am using Vim 7.3 and would like to continue to do this.
- Ruby 1.9.3 is installed on my system, and I need it in PATH for other projects.
So, is there a way to get this working while keeping the latest version of ruby ββand the latest version of vim?
UPDATE
Following the advice of AndrewMarshall, I installed Ruby191 and DevKit-4.5.0-201001919-1536-sfx.exe according to this tutorial and run ruby extconf.rb through this version. make cmd completed successfully with this output:
gcc -I. -IC:/Ruby191/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby191/include/ruby-1 .9.1/ruby/backward -I/C/Ruby191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g - Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o ext.o -c ext.c gcc -I. -IC:/Ruby191/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby191/include/ruby-1 .9.1/ruby/backward -I/C/Ruby191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g - Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o match.o -c match.c gcc -I. -IC:/Ruby191/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby191/include/ruby-1 .9.1/ruby/backward -I/C/Ruby191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g - Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o matcher. o -c matcher.c gcc -shared -s -o ext.so ext.o match.o matcher.o -L. -LC:/Ruby191/lib -L. -Wl,- -enable-auto-image-base,--enable-auto-import -lmsvcrt-ruby191 -lshell32 -lws2 _32
and start :CommandT in vim works now, but as soon as I start typing in the text to search for the file, and then press Enter to select and open it, I get the following: 