我正在尝试在 OS X 10.8 上安装 Command-T 并按照http://www.vim.org/scripts/script.php?script_id=3025上的说明进行操作,但是当我尝试构建 Makefile 时,我得到以下信息错误:
Command-T[master+]/ruby/command-t
❯ ruby extconf.rb
checking for ruby.h... no
couldn't find ruby.h (required)
我正在使用系统 ruby,这是 Vim 编译(由我自己)针对的一个。如你所见,Vim 编译时带有 ruby 支持:
Command-T[master+]/ruby/command-t
❯ ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Command-T[master+]/ruby/command-t
❯ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 29 2013 10:09:48)
MacOS X (unix) version
Included patches: 1-785
Compiled by caleb@sirius.local
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
+mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_sgr -mouse_sysmouse
+mouse_urxvt +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg
+path_extra -perl +persistent_undo +postscript +printer +profile +python
-python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang -L. -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa -framework Python -lruby -lobjc
来自 Vim:
:ruby puts RUBY_VERSION
1.8.7
我ruby.h
在 /System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ruby.h 中找到了所需的文件并尝试了两者
export CPP_INCLUDE_PATH=/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/
export C_INCLUDE_PATH=/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/
但是这些都没有使have_header('ruby.h')
返回为真,并且ruby extconf.rb
继续失败。
有任何想法吗?