У меня была эта проблема некоторое время с vim. В первый раз я делаю все, что взаимодействует с рубином, например :ruby puts "test"
, я получаю <internal:gem_prelude>:1:in 'require': cannot load such file -- rubygems.rb (LoadError)
.
Некоторая диагностическая информация, которая может быть полезна: моя ОС - OS X 10.11.2, Vim - версия 7.4, ruby - 2.1.2, установленный с rvm, моя оболочка - zsh (но это также происходит с bash) и мой vim полностью ваниль.
$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ rvm list
rvm rubies
=* ruby-2.1.2 [ x86_64 ]
# => - current
# =* - current && default
# * - default
$ which -a ruby
/Users/marcusbuffett/.rvm/rubies/ruby-2.1.2/bin/ruby
/usr/local/bin/ruby
/usr/local/bin/ruby
/usr/bin/ruby
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 18 2016 09:07:16)
MacOS X (unix) version
Included patches: 1-1401
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+channel -gettext -mzscheme +textobjects
+cindent -hangul_input +netbeans_intg +title
-clientserver +iconv +packages -toolbar
+clipboard +insert_expand +path_extra +user_commands
+cmdline_compl +job +perl +vertsplit
+cmdline_hist +jumplist +persistent_undo +virtualedit
+cmdline_info +keymap +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python +vreplace
+cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu +ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xsmp
+emacs_tags -mouseshape -sniff -xterm_clipboard
+eval +mouse_dec +startuptime -xterm_save
+ex_extra -mouse_gpm +statusline -xpm
+extra_search -mouse_jsbterm -sun_workshop
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -F/usr/local/Frameworks -DMACOS_X_UNIX -Os -w -pipe -march=native -mmacosx-version-min=10.11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang -L. -L/Users/travis/.sm/pkg/active/lib -fPIC -Bstatic -fstack-protector -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -o vim -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python -lruby-static -framework CoreFoundation -lobjc -L/Users/marcusbuffett/.rvm/rubies/ruby-2.1.2/lib