chruby: Can't get chruby to play nice with vim :(.
I just got a new MacBook Pro (first time in ~ 3 years) and decided to give chruby a go this time round instead of RVM.
I’ve sourced chruby in my ~/.zshrc
:
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
In my vim config, I have:
set shell=$SHELL\ -l
.ruby-version in my project root is:
1.9.3-p448
…yet, when I run :!ruby --version
it shows me that it’s running Apple’s default system ruby:
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Any ideas what I’m doing wrong?
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 20 (5 by maintainers)
Commits related to this issue
- Fix zsh loading in Mac for MacVim. See https://github.com/postmodern/chruby/issues/196 — committed to apuignav/dotfiles-local by apuignav 9 years ago
You probably run zsh. You can set the shell to be
set shell=bash
in Vim if you don’t absolutely require zsh in Vim.The zsh problem is likely due to Mac OS X shipping with
/etc/zshenv
which should be/etc/zprofile
. Fix that with:This fixes more issues down the road than just Vim.