When editing ruby, some files but not all are garbled when editing in vim.
Inspecting the options with :set, I discovered that there is some magic done to produce one of the option values, and something went wrong with the magic and there is an error or warning message where the option value should be. That may be causing side effects.
The method throwing the error is Gem.all_load_paths, and it happens regardless of whether I use ruby 1.8.7, 1.9.2, whether I use rvm or system ruby. Using Ubuntu 11.10
I've tried setting the omnifunc option to nil, but that doesn't solve the problem; it seems to be a different option producing this value. The plugins I'm using can be seen below.
:set --- Options --- autoindent comments=:# history=50 keywordprg=ri scroll=29 suffixesadd=.rb ttyfast backup filetype=ruby hlsearch mouse=a shiftwidth=2 syntax=ruby ttymouse=xterm2 backupdir=~/.tmp helplang=en incsearch ruler showcmd tabstop=2 backspace=indent,eol,start balloonexpr=RubyBalloonexpr() commentstring=# %s fileencodings=ucs-bom,utf-8,default,latin1 formatoptions=croql include=^\s*\<\(load\|w*require\)\> includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','') indentexpr=GetRubyIndent() indentkeys=0{,0},0),0],!^F,o,O,e,=end,=elsif,=when,=ensure,=rescue,==begin,==end omnifunc=rubycomplete#Complete f rom ~/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:62:in `all_load_paths'^@^Ifrom -e:1^@1.8/rubygems/deprecate.rb:62:in `send'^@^I printoptions=paper:letter / after,/var/lib/vim/addons/after,~/.vim/afterm,~/.vim/bundle/vim-rails,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
pathoption. I spent more time ruling out possible causes, removing plugins, etc. The output of:sethas changed now, and all plugins back in place. I think opening and closing and opening my shell was the most recent think I did before noticing the change. The editor is usable now, and the files don't become hopelessly garbled. However, within the value ofpath, there is still a notice that Gem.all_load_paths is deprecated.