user805981
user805981

Reputation: 11069

Cannot find RVM upon loading new Bash shell

I'm really confused with this RVM Bash not being able to find my directory. This is really killing me. Whenever I load a new bash shell it keeps telling me:

-bash: /Users/<username>/.rvm/scripts/rvm : No such file or directory

I can't figure out what is wrong with my bash.

The following is what my .bashrc looks like:

1 export PATH=/usr/local/bin:/usr/local/sbin:$PATH
2 
3 
4 export PATH=/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Users/<username>/.rvm/gems/ruby-1.9.2-p290/bin:/    Users/<username>/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/<username>/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/<username>/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysq    l/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/MacGPG2/bin
5 
6 
7 # This line for ruby version manager has been commented out
8 PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

The following would be my .bash_profile:

 6 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
 7 
 8 ##
 9 # Your previous /Users/<username>/.bash_profile file was backed up as /Users/<username>/.bash_profile.macports-saved_2011-11-01_at_20:41:30
10 ##
11 
12 # MacPorts Installer addition on 2011-11-01_at_20:41:30: adding an appropriate PATH variable for use with MacPorts.
13 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
14 # Finished adapting your PATH environment variable for use with MacPorts.
15 
16 
17 # Setting PATH for Python 2.7
18 # The orginal version is saved in .bash_profile.pysave
19 PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
20 export PATH

Upvotes: 4

Views: 2567

Answers (1)

Remear
Remear

Reputation: 1937

This usually happens with a broken RVM installation. Did you just try to remove RVM or remove ~/.rvm by accident?

I would first try removing line 6 in your .bash_profile since the official way to load RVM now seems to be what you have on line 8 of your .bashrc. Also, make sure your .bashrc is actually being loaded. On OS X, .bashrc not loaded by default.

Be sure to close all of your Terminal windows and reopen them so all your profile scripts are sourced again and none of them get missed.

If it still doesn't work, I would recommend you just install it again with curl -L https://get.rvm.io | bash -s stable

Upvotes: 6

Related Questions