From 53c6521d9c7722fa80d246512e93e2243713967c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 7 Jan 2013 11:52:21 +0000 Subject: [PATCH] Switch rbenv back to manual install method --- shell/ruby.sh | 12 ++++++++++-- shell/zshrc.sh | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/shell/ruby.sh b/shell/ruby.sh index 280726d..a1a9b2f 100644 --- a/shell/ruby.sh +++ b/shell/ruby.sh @@ -35,5 +35,13 @@ elif [ -n "$ZSH_VERSION" ]; then alias va="vagrant" fi -# Load rbenv -if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi +# Load rbenv or RVM depending on which is available +if [ -d "$HOME/.rbenv/bin" ]; then + # Don't load rbenv again if oh-my-zsh's rbenv plugin already has + if [[ ":$PATH:" != *":$HOME/.rbenv/bin:"* ]]; then + path_prepend "$HOME/.rbenv/bin" + eval "$(rbenv init -)" + fi +elif [ -s "$HOME/.rvm/scripts/rvm" ]; then + source "$HOME/.rvm/scripts/rvm" +fi diff --git a/shell/zshrc.sh b/shell/zshrc.sh index 4c021ed..5b30257 100644 --- a/shell/zshrc.sh +++ b/shell/zshrc.sh @@ -35,7 +35,7 @@ DISABLE_AUTO_TITLE="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(brew bundler cake cap gem heroku node nyan osx powder python rails3 \ - ruby thor vagrant) + rbenv ruby thor vagrant) source "$ZSH/oh-my-zsh.sh"