Why is my RVM configuration messed up?
I think I screwed up my development environment the other day and I can't figure out how to get RVM working again.
I cleaned up my startup files for my shell and consolidated my .profile
, .bash_profile
, .bash_login
, and .bashrc
files into a single .bash_profile
in my user directory.
Ever since I did this, my RVM environment has been screwed up. Now, when I do a which rails
and which ruby
, my system is now referencing my /usr/local/bin
directory instead of my ~/.rvm/bin
like it used to.
Here 开发者_运维百科are the first two lines of my .bash_profile
config:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:$PATH"
I'm not a UNIX guru and I fear that I'm missing a certain variable name in my "$PATH
" declaration. Any help would be greatly appreciated.
Try to add the RVM line at the end of your .profile and ensure that there are no return
statement in it.
See the RVM installation documentation.
Especially :
Ensure that RVM is sourced after any path settings as RVM and manipulates the path. If you don't do this, RVM may not work as expected.
精彩评论