wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

"could not load the C extension" -- Ruby versions match, followed all instructions #325

Closed vjsingh closed 6 years ago

vjsingh commented 6 years ago

Hey all,

I have tried everything, and can't get command-t to work on my new mac.

This is my error message upon trying to start command-t in vim: "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 For more information type: :help command-t"

My vim is installed using HomeBrew. Opening "/usr/local/Cellar/vim/8.0.1400_4/bin/vim" and running 'ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"', I get "2.5.0-p0"

Ran these commands on an to install a new version of command-t (freshly installed with vim-plug): ext/command-t: rvm use 2.5.0 ext/command-t: ruby --version --> ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17] ext/command-t: ruby extconf.rb; make --> (No Errors)

I tried to "brew uninstall vim; brew install vim," but none of these are working.

Beating my head against the wall. Any help with troubleshooting? Not sure what else to try. Thank you very much for an excellent plugin.

wincent commented 6 years ago

Can you share the full output of a clean build of Command-T and Vim ":version"?

vjsingh commented 6 years ago

Yep, here you go. Thank you for the help.

➜ command-t git:(master rvm use 2.5.0 Warning! PATH is not properly set up, '/Users/Varun/.rvm/gems/ruby-1.8.7-p371@wordless/bin' is not available. Usually this is caused by shell initialization files. Search for 'PATH=...' entries. You can also re-add RVM to your profile by running: 'rvm get stable --auto-dotfiles'. To fix it temporarily in this shell session run: 'rvm use ruby-1.8.7-p371@wordless'. To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file. Using /Users/Varun/.rvm/gems/ruby-2.5.0 ➜ command-t git:(master ruby --version ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17] ➜ command-t git:(master make clean ➜ command-t git:(master 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 *➜ command-t git:(master make** compiling ext.c compiling heap.c compiling match.c compiling matcher.c compiling watchman.c linking shared-object ext.bundle

:version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 8 2018 13:58:05) macOS version Included patches: 1-1400 Compiled by Homebrew Huge version without GUI. Features included (+) or not (-): +acl -clientserver +dialog_con +find_in_path +keymap +modify_fname +multi_byte +profile +statusline +textobjects +wildignore +arabic +clipboard +diff +float +lambda +mouse +multi_lang +python -sun_workshop +timers +wildmenu +autocmd +cmdline_compl +digraphs +folding +langmap -mouseshape -mzscheme -python3 +syntax +title +windows -autoservername +cmdline_hist -dnd -footer +libcall +mouse_dec +netbeans_intg +quickfix +tag_binary -toolbar +writebackup -balloon_eval +cmdline_info -ebcdic +fork() +linebreak -mouse_gpm +num64 +reltime +tag_old_static +user_commands -X11 +balloon_eval_term +comments +emacs_tags -gettext +lispindent -mouse_jsbterm +packages +rightleft -tag_any_white +vertsplit -xfontset -browse +conceal +eval -hangul_input +listcmds +mouse_netterm +path_extra +ruby -tcl +virtualedit -xim ++builtin_terms +cryptv +ex_extra +iconv +localmap +mouse_sgr +perl +scrollbind +termguicolors +visual -xpm +byte_offset +cscope +extra_search +insert_expand -lua -mouse_sysmouse +persistent_undo +signs +terminal +visualextra -xsmp +channel +cursorbind +farsi +job +menu +mouse_urxvt +postscript +smartindent +terminfo +viminfo -xterm_clipboard +cindent +cursorshape +file_in_path +jumplist +mksession +mouse_xterm +printer +startuptime +termresponse +vreplace -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework AppKit -mmacosx-version-min=1 0.13 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.5.0 -lobjc

vjsingh commented 6 years ago

@wincent Still haven't been able to get this to work. Let me know if there's anything further I can offer for debugging

daniyalzade commented 6 years ago

I am on the same boat @vjsingh . Any luck here?

vjsingh commented 6 years ago

@daniyalzade No luck at all, sorry. Totally dead-ended.

Did you also recently upgrade your mac?

wincent commented 6 years ago

I would just get rvm out of the loop and use the system Ruby.

daniyalzade commented 6 years ago

genius! that did the trick for me :)

Below were the list of steps to get it working @vjsingh

cd ~/.vim/bundle/command-t/ruby/command-t/ext/command-t
rvm implode # gets rid of RVM
ruby extconf.rb
make clean
make
vjsingh commented 6 years ago

Wow, it worked! woooo happy days are here again!!!

Thanks @wincent. And thanks @daniyalzade for posting the commands you used, worked perfectly for me.

guang commented 6 years ago