building vim with ruby support

47 views
Skip to first unread message

K H

unread,
Dec 23, 2011, 1:15:32 AM12/23/11
to vim...@googlegroups.com
Hi,

I'm on 10.7.2 with Xcode 4.2.1 and switch between system ruby 1.8.7 (2010-01-10 patch level 249) and use rbenv to manage 1.9.3-p0.

When I build vim (downloaded today from vim website) and ./configure --enable-rubyinterp while using 1.8.7 it builds find, and vim --version shows +ruby.

But when I build vim with 1.9.3 it builds fine, but vim --version shows -ruby.

Would I run into problems if I build vim with 1.8.7 but use it to work with 1.9.3?

Thanks!

Ken

Jason Felice

unread,
Dec 23, 2011, 9:58:42 AM12/23/11
to vim...@googlegroups.com
When vim builds against a ruby, that will be the ruby it uses regardless
of rvm or rbenv - so you'll not be able to switch.

I've not had luck building against a non-system ruby, though a co-worker
was able to do it.

-Jason

> --
> You received this message from the "vim_mac" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

Phil Dobbin

unread,
Dec 23, 2011, 11:53:20 AM12/23/11
to vim_mac
On 23/12/11 14:58, "Jason Felice" <jason.m...@gmail.com> wrote:

> When vim builds against a ruby, that will be the ruby it uses regardless
> of rvm or rbenv - so you'll not be able to switch.
>
> I've not had luck building against a non-system ruby, though a co-worker
> was able to do it.

Try using rvm. Then you can switch your Ruby version & if you compile vim in
the same shell, it'll compile with the rvm specified Ruby (the codicil to
this statement is I don't know your compiler status, env, header files
situation & so forth).

If you do install rvm I recommend using the single-user install rather than
the multi-user one. It'll save you a lot of grief further on down the line
if you're the only user of Ruby on your machine.

Cheers,

Phil...

--
Nothing to see here... move along, move along

Phil Dobbin

unread,
Dec 23, 2011, 11:59:09 AM12/23/11
to vim_mac
Here's a copy of my version for MacVim v.63:

`Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall
-Wno-unknown-pragmas -pipe -D
MACOS_X_UNIX -no-cpp-precomp -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -L. -bind_at_load -L. -bind_at_load -L/usr/local/lib
-o Vim -framework Cocoa -fr
amework Carbon -lncurses -framework Cocoa -fstack-protector
-L/usr/local/lib -L/opt/local/lib

-L/Users/dobbin/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level/CO
RE -lperl -lm -lutil -lc
-framework Python -lruby -lobjc
-L/Users/dobbin/.rvm/rubies/ruby-1.8.7-p352/lib
Press ENTER or type command to continue`

Reply all
Reply to author
Forward
0 new messages