Tom Scott edited this page Oct 3, 2013 · 5 revisions

For Bash

In order to use chruby from the !sh shell, you need to change vim's shell:

set shell=$SHELL

This will cause vim to spawn a login shell, which will load chruby.

For Zsh

You'll probably need to sudo mv /etc/{zshenv,zprofile} to ensure the PATH is set correctly. (More info).


If you have loaded, you can cd into a project with a .ruby-version file and invoke the editor from the command-line. This will cause the editor to inherit the environment variables setup by chruby.