Skip to content

Instantly share code, notes, and snippets.

@mrnugget
Created March 25, 2012 13:21
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mrnugget/2193743 to your computer and use it in GitHub Desktop.
Make MacVim use the correct $PATH with rbenv

Move /etc/zshenv

Get rbenv and ruby working in MacVim

  • Put this in your ~/.zprofile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
  • :!ruby -v should show you the global ruby version you set with rbenv global

Get excuberant ctags (installed with homebrew) working in MacVim

  • Change your ~/.zprofile to look like this:
export PATH="$HOME/.rbenv/bin:/usr/local/bin:$PATH"
eval "$(rbenv init -)"
  • :!ctags --version should now show you the version you installed with homebrew
@zachzhao1984
Copy link

still don't work for me
I have done as this gist tell me to do, but in Macvim, when I type :!ctags --version or :!ruby -v , I got wrong version. sad..

@andredublin
Copy link

For setting up rbenv/ruby in macvim I had to put this in my /etc/zprofile

export RBENV_ROOT=/usr/local/var/rbenv
if
  which rbenv > dev/null;
  then eval "$(rbenv init -)";
if

Also make sure you don't have a zprofile script under your user account @ /User/(account name)/zprofile
Remove or copy that file information into /etc/zprofile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment