in my rails app folder foo ,
ruby -v is
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0], but open foo in vim,
:!ruby -v is
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0].
anyone can help ?
Maybe, did you write $PATH in
.zshrc? If so, you should use
.zshrc is not loaded when called script commands from vim and some applications.
Or you're using zsh on OS X. You should move /etc/zshenv to /etc/zshrc.
You should set your shell vim uses for running commands:
You can just put it into your ~/.vimrc or run manually to test it first.
This way you will get the same environment in vim as with your interactive shell.