/ / Wo wird Ruby meinem $ PATH hinzugefügt? - Ruby, Bash, Path, Umgebungsvariablen

Wo wird Ruby zu meinem $ PATH hinzugefügt? - Ruby, Bash, Pfad, Umgebungsvariablen

Ich verwende Mac Yosemite mit Bash-Shell. Ich hatte Ruby 2.2.1 installiert, wollte es dann aber aktualisieren, also habe ich Ruby 2.3.0 installiert. Wenn ich jedoch mein Terminal neu starte, werden meine alten Ruby-Installationen in meinem PATH…

Daves-MacBook-Pro-2: davea$ echo $PATH
/Users/davea/.rvm/gems/ruby-2.2.1/bin:/Users/davea/.rvm/gems/ruby-2.2.1@global/bin:/Users/davea/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin/:/opt/gradle-2.7/bin:/opt/apache-maven-3.3.3/bin:/Users/davea/.rvm/bin:/usr/local/mysql/bin

Ich kann nicht herausfinden, wie dieser Teil meines PFADS gesetzt wird. Ich habe diese Dateien auf meinem System überprüft

/etc/profile
/etc/bashrc
~/.profile
~/.bash_profile

Ich sehe jedoch nirgendwo Verweise auf Ruby 2.2.1. Unten finden Sie den Inhalt der Dateien. Gibt es noch andere Dateien, die ich überprüfen sollte, um Verweise auf $ PATH zu finden?

/ etc / Profil

# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi

JBOSS_HOME=/opt/wildfly-10.0.0.CR2
M2_HOME=/opt/apache-maven-3.3.3
CATALINA_HOME=/opt/apache-tomcat-6.0.44
GRADLE_HOME=/opt/gradle-2.7

PATH=$PATH:/usr/local/mysql/bin/:$GRADLE_HOME/bin:$M2_HOME/bin

/ etc / bashrc

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi

PS1="h:W u$ "
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
update_terminal_cwd() {
# Identify the directory using a "file:" scheme URL,
# including the host name to disambiguate local vs.
# remote connections. Percent-escape spaces.
local SEARCH=" "
local REPLACE="%20"
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf "e]7;%sa" "$PWD_URL"
}
PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
fi

~ / .profile

export JBOSS_HOME=$JBOSS_HOME
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

~ / .bash_profile

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

Antworten:

2 für die Antwort № 1

RVM richtet Ruby und verwandte PFADE für Sie ein. Bekommen 2.3 Führe das aus

rvm --default use 2.3.0