Created
April 7, 2010 00:46
-
-
Save jamesarosen/358327 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi | |
if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi | |
export RUBY_VERSION_MANAGER_PATH=/Users/jrosen/.rvm/bin | |
export PATH=$PATH:$RUBY_VERSION_MANAGER_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi | |
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi | |
if [[ -z "$rvm_prefix" ]] ; then unset rvm_prefix ; fi | |
if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi | |
if [[ -z "$rvm_prefix" ]] ; then | |
if [[ "root" = "$(whoami)" ]] ; then | |
rvm_prefix="/usr/local" | |
else | |
rvm_prefix="$HOME" | |
fi | |
fi | |
if [[ -z "$rvm_path" ]] ; then | |
unset rvm_path | |
if [[ "root" = "$(whoami)" ]] ; then | |
rvm_path="$rvm_prefix/rvm" | |
else | |
if [[ -d "$HOME/.rvm" ]] && [[ -s "$HOME/.rvm/scripts/rvm" ]]; then | |
rvm_path="$HOME/.rvm" | |
elif [[ -d "$rvm_prefix/rvm" ]] && [[ -s "$rvm_prefix/rvm/scripts/rvm" ]] ; then | |
rvm_path="$rvm_prefix/rvm" | |
else | |
rvm_path="$HOME/.rvm" | |
fi | |
fi | |
fi | |
rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}" | |
source $rvm_scripts_path/rvm | |
unset rvm_interactive | |
rvm "$*" |
There's nothing in ~/.rvm/current or ~/.bashrc. The former doesn't exist; the latter is empty.
LOL!!!
I have no idea how I missed this the first time.
if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi
Should be
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
Remove the current line and the two RUBY_VERSION_MANAGER_PATH lines (unless you are using that variable for something other than setting PATH.
Bingo!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's in this?
if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi
Additionally as long as RVM is able to load this is redundant, meaning RVM should stick it in automatically:
export RUBY_VERSION_MANAGER_PATH=/Users/jrosen/.rvm/bin
export PATH=$PATH:$RUBY_VERSION_MANAGER_PATH
What is in your ~/.bashrc ? My guess would be there is something in there preventing it from loading, in
combination with that ~/.rvm/current line.