s:rubypath in ftplugin/ruby.vim

Jason LaRiviere jason at indelicate.net
Tue Jan 23 14:40:02 EST 2007


Mark Guzman wrote:
> Tim Pope wrote:
> > Very odd.  rails.vim only recently started making use of the Vim-Ruby
> > interface.  The next revision will limit it to Windows only; perhaps I
> > should just do away with it all together (although I can't reproduce
> > any of these problems on Windows).  For the record, rails.vim uses it
> > in two places which previously used system():
> >
> > 1. require 'action_view' and extract a list of helper methods from it.
> >
> > 2. require 'yaml' and parse database.yml (only if dbext.vim is installed)
> >
> > On my system, I observe the following behaviors.  If the first is
> > performed, with or without the second. the stack overflow error starts
> > to be seen when completion is used.  If the second is performed
> > *without* the first, Vim will segfault when completion is used.
> > Things work fine if you :ruby require the same libraries manually, and
> > things still break if all rails.vim does is require the same
> > libraries.  Perhaps is has something to do with how things are nested
> > in a Vim function.  I will investigate further.
> >
> >   
> Weird, I'll see if i can be of any help. If it's a problem w/ the 
> vim-ruby bridge it'd be nice if we could fix it.
> >> Have you actually experienced a crash due to the path discovery code?
> >>     
> >
> > No.  This user claims to have, even without rails.vim loaded.
> > g:rubycomplete_rails might have been set.
> >   
> Who? Can you forward on the email so I can find out more? The rails 
> support stuff is pretty intense since it's loading rails into the env.
>   --mark

I believe we're discussing my particular problem here. I've had some
conference with Tim Pope about the aforementioned.

Here's my situation:
brand new macbook, osx 10.4.8

ruby 1.8.5. from source, --enable-pthreads
--with-readline-dir=/usr/local --prefix=/usr/local

vim 7.0.183 from source, --disable-gui --enable-rubyinterp
--prefix=/usr/local

rails 1.2.1, rubygems 0.9.0

Before Tim fixed up his rails.vim, as noted, vim trapped and died:
(from gdb)
dyld: Symbol not found: _rb_path2class
Referenced from:
/usr/local/lib/ruby/1.8.i686-darwin8.8.3/digest/sha2.bundle

The stock rubycomplete.vim works, as long as I don't attempt a rails
completion, straight up ruby omni works. The most recent
rubycomplete.vim from cvs kill it straight away, as did the version of
ftplugin before tpope messed with it.

As it stands, with the recently updated ftplugin, rails, and stock
rubycomplete vim scripts, I'm alright, as long as I don't attempt a
rails completion or try including 'rubygems' anywhere. Manually doing
:ruby require 'rubygems' traps vim immediately, always with the same
error from gdb.

I'm currently hassling friends with osx to attempt a replication of this
issue, as I'm quite sure it's the build of ruby within osx.

Thanks,
Jason.
-- 
GPG/PGP key ID: 0x3A410DBD | http://pgp.mit.edu
7B3F 4505 7D9A 7FDE 83C9  52C2 4909 59B9 3A41 0DBD


More information about the vim-ruby-devel mailing list