Why will macvim always use ruby ββ1.9.3?
I installed yadr dotfiles , vim plugin suite, ruby, etc.
I have the following line of Ruby code in a file foo.rb
:
foo: bar
Note. I used the ruby ββ1.9.3 syntax to assign / define a symbol.
When I start macvim from the command line with mvim foo.rb
and save this file everything works fine.
However, when I open macvim using open -a macvim
, and navigate and open foo.rb
, when I try to save the file, I get a ruby-vim syntax error on foo: bar
. When I change it to :foo => bar
, I don't get syntax errors.
- Using
open -a macvim
to open macvim and then type:!ruby -v
printsruby 1.8.7
- Using
mvim .
to open macvim and then type:!ruby -v
printsruby 1.9.3
Depending on how I open macvim, I get a different Ruby version. How can I ensure that macvim always uses ruby ββ1.9.3 to evaluate my ruby ββcode?
thank
source to share
It took me a while to find the fix, but the problem is caused by MacVim not loading zsh in the same way Terminal boots zsh.
The fix is ββsimple enough and can be put into your zshrc. See the commit from my dotfiles:
https://github.com/simeonwillbanks/dotfiles/commit/e0e19cfeff13f8bc99d8164217ddd84c6d7f9529
The link links for a full explanation which can be found here:
http://vim.1045645.n5.nabble.com/MacVim-and-PATH-tt3388705.html#a3392363
Hope this helps!
source to share