Is vim 7.3 ready for compiling with ruby 1.9.2 support?

76 views
Skip to first unread message

talek

unread,
May 19, 2011, 2:36:26 PM5/19/11
to vim_use
Hi guys,

Because I have little knowledge about how vim integrates with ruby
interpreter especially at the compile time I'm asking for help. The
problem I have is that I'm trying to compile the last version of vim
(from the mercurial repository) with ruby 1.9.2 support. While the
whole compilation process goes without any complaints, it seems that
some ruby features do not work as expected. For example, running:

vim -c ':ruby p RUBY_VERSION; require "pty"; $r, $w, $p =
PTY.spawn("ls -al")'

it gives the following:

"1.9.2"
Error detected while processing command line:
NoMethodError: undefined method `flush' for #<Object:0x00000001d26f80>

However, trying the same with a plain ruby interpreter everything is
fine:

[talek@home ~]$ which ruby
/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby

[talek@home ~]$ ruby -e 'p RUBY_VERSION; require "pty"; $r, $w, $p =
PTY.spawn("ls -al")'
"1.9.2"

I really don't have any clues about the strange NoMethodError and why
it is raised from the vim environment only. I've tried also with the
last HEAD ruby 1.9.2 version but without any luck. Interestingly
enough, it's working with ruby 1.9.1-p431 and the latest HEAD 1.9.1
version but not with ruby 1.9.1-p378 and any ruby 1.9.2 I tried. As
far as the OS platforms are concerned, my attempts were on a Linux
Mint and Fedora 14.

Any ideas how to solve this? Is it ruby or vim fault? I develop/
maintain a vim plugin which relies on the PTY functionality and it's
quite frustrating that I cannot figure out the cause of this strange
error.

Many thanks!

Ned

unread,
May 27, 2011, 10:21:46 PM5/27/11
to vim_use
I am having the same issue

./configure --enable-rubyinterp --enable-gui=no --disable-gpm

Works ok... and I can see this in the make step output ...

checking --enable-rubyinterp argument... yes
checking --with-ruby-command argument... defaulting to ruby
checking for ruby... (cached) /usr/local/bin/ruby
checking Ruby version... OK
checking Ruby header files... /usr/local/Cellar/ruby/1.9.2-p180/
include/ruby-1.9.1

Make/install works without incident. But then...

vim --version | grep ruby
+printer -profile -python +quickfix +reltime -rightleft -ruby
+scrollbind

So there was an issue. But I cannot see anything reported during the
configure/make step?

Have double checked I am running the correct vim command, too.

My vim73/src/auto/config.mk file looks like this:

RUBY = /usr/local/bin/ruby
RUBY_SRC = if_ruby.c
RUBY_OBJ = objects/if_ruby.o
RUBY_PRO = if_ruby.pro
RUBY_CFLAGS = -I/usr/local/Cellar/ruby/1.9.2-p180/include/
ruby-1.9.1 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/
x86_64-darwin10.7.0 -DRUBY_VE
RUBY_LIBS = -lruby.1.9.1 -lpthread -ldl -lobjc

Any ideas?

Ned

unread,
May 31, 2011, 5:57:11 AM5/31/11
to vim_use
I found this post but it seems to relate to Windows vim/ruby?

http://groups.google.com/group/rubyinstaller/browse_thread/thread/946938ecd61b9454

Has anyone managed to compile VIM with Ruby 1.9.2 support on Mac Snow
Leopard?

thanks for any clues whatsoever :) !





On May 28, 12:21 pm, Ned <rails.n...@gmail.com> wrote:
> I am having the same issue
>
>    ./configure --enable-rubyinterp --enable-gui=no --disable-gpm
>
> Works ok... and I can see this in the make step output ...
>
>    checking --enable-rubyinterp argument... yes
>    checking --with-ruby-command argument... defaulting toruby
>    checking forruby... (cached) /usr/local/bin/ruby
>    checkingRubyversion... OK
>    checkingRubyheader files... /usr/local/Cellar/ruby/1.9.2-p180/
> include/ruby-1.9.1
>
> Make/install works without incident. But then...
>
>    vim --version | grepruby
>    +printer -profile -python +quickfix +reltime -rightleft -ruby
> +scrollbind
>
> So there was an issue. But I cannot see anything reported during the
> configure/make step?
>
> Have double checked I am running the correct vim command, too.
>
> My vim73/src/auto/config.mk file looks like this:
>
>    RUBY   = /usr/local/bin/ruby
>    RUBY_SRC  = if_ruby.c
>    RUBY_OBJ  = objects/if_ruby.o
>    RUBY_PRO  = if_ruby.pro
>    RUBY_CFLAGS = -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/

Ned

unread,
Jun 9, 2011, 7:07:11 AM6/9/11
to vim_use
Any luck, talek?

7.2 seems to have similar issues...

talek

unread,
Jun 9, 2011, 11:30:24 AM6/9/11
to vim_use
As far as I'm concerned is just about the malfunction of the PTY ruby
feature. I end up with a valid +ruby vim:

FITS\alec@tia ~/.build/hg/vim/src $ ./vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 9 2011 18:28:20)
Included patches: 1-189
Compiled by FITSlec@tia
Normal 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_sysmouse
+mouse_xterm -multi_byte +multi_lang -mzscheme +netbeans_intg -
osfiletype
+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_interact +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:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -
D_FORTIFY_SOURCE=1
Linking: gcc -L. -rdynamic -Wl,-export-dynamic -L/usr/local/lib -
Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -
lICE -lm -lncurses -lnsl -lselinux -Wl,-R -Wl,/usr/local/rvm/
rubies/ruby-1.9.2-p180/lib -L/usr/local/rvm/rubies/ruby-1.9.2-p180/lib
-lruby -lpthread -lrt -ldl -lcrypt -lm -L/usr/local/rvm/rubies/
ruby-1.9.2-p180/lib
Reply all
Reply to author
Forward
0 new messages