I've found some ruby runtime errors jump me to a non-existent file
sroberts at uniserve.com
Sun Mar 26 18:29:50 EST 2006
The latest vim-ruby is working well for me, good work you all.
One persistent problem. Mostly, errors take me to the source, but
occaisonally I get a blank buffer, with what appears to be the name of
the file that has the error in the mode line. It depends on the type of
error, but I just reproduced it.
The error is a yield in a method that wasn't passed a block, and the
output, shown from a terminal:
ruby -w -I lib test_vcard.rb -n test_modify
Loaded suite test_vcard
Finished in 0.007522 seconds.
LocalJumpError: no block given
1 tests, 1 assertions, 0 failures, 1 errors
make: *** [do] Error 1
When I run the unit tests from vim (with :make), then the error file
name is " ./lib/vpim/maker/vcard.rb", it includes the leading white
Thats a valid filename of course, its just not the name of the file with
the error. vim doesn't find the directory " .", so it can't open the
file, and I'm left staring puzzledly at a blank buffer.
In case this is a problem with my local install:
My ~/.vim after installing vim-ruby, I didn't change any of these:
---- my .vimrc ----
" Existing files are overwritten. This is safe, because it's a slow-maturing
" project, so new files are better than old ones. However, if you had edited the
" files, you will have lost your changes. Better make your changes in, for
" ~/.vim/after/ftplugin/ruby.vim ~
" This file will be loaded _after_ the regular config files are loaded, so your
" customisations will definitely take effect.
" See the Exuberant ctags mailing list, where Elliott Hughes (who wrote this)
" posted a [patch] for this. His editor, [Edit], uses Exuberant ctags to show
" a tree of classes and methods where what you're editing is highlighted, and
" you can click elsewhere to jump to that method, so he needed better Ruby
" It's not perfect (it doesn't use the real Ruby yacc parser), but it's pretty
filetype indent on
filetype plugin on
"set ignorecase " Do case insensitive matching
set autowrite " Automatically save before commands like :next and :make
set backspace=indent,eol,start " more powerful backspacing FIXME - does what?
set incsearch " Incremental search
set ruler " show the cursor position all the time
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set vb t_vb=
" FIXME - does what?
" compiler ruby
" FIXME - I want the list when I do TAB, how do I do that?
" Suffixes that get lower priority when doing tab completion for filenames.
" These are files we are not likely to want to edit or read.
" Configure these terminals to be color.
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "xterm"
hi clear Identifier
" "set errorformat=%f:%l:\ %m,%Dgmake[%*\\d]:\ Entering\ directory\ `%f',%Dgmake[%*\\d]:\ Leaving\ directory\ `%f'
" let s:cpo_save = &cpo
" set cpo-=C
" " setlocal errorformat=\%Etest%[%^\ ]%#(%[%^\ ]%#)\ [%f:%l]:,
" " \%Z%m%\\%.,
" " \%C%m%\\%.,
" " \%-GLoaded%.%#,
" " \%-GStarted%.%#,
" " \%-G%[EF%.]%.%#,
" " \%-GFinished\ in%.%#,
" " \%-G\ %\\+%\\d%\\+)\ Failure:,
" " \%-G\ %\\+%\\d%\\+)\ Error:
" let &cpo = s:cpo_save
" unlet s:cpo_save
More information about the vim-ruby-devel