last day (14 days later) » 

7:03 AM
0
A: "rvm is not a function" with root user on ubuntu desktop

SantoshAdd this to your .bashrc [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

 
This doesn't have any affect.
 
did you try closing and opening the terminal after adding this?
 
Yes I did and it had no effect. I already had a similar line in .bash_profile for root.
 
Do you have .rvm folder in your home folder? What is the output of echo $HOME ?
 
The output of echo $HOME is "/root"
And no there is no .rvm in the home folder.
 
7:03 AM
Ok, from my answer, instead of $HOME, insert path to folder containing .rvm
 
I cannot find a ".rvm" in the filesystem at all. Even when I go to / directory. And run "locate .rvm", nothing shows up.
hello thanks for the responses
 
You can do which rvm from your terminal
 
That returns the following: /usr/local/rvm/bin/rvm
 
gimme a sec
 
7:06 AM
Im not sure about this, but you could try [[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
 
hey that appeared to work
Here's the interesting thing. I actually already had this line in my .bash_profile:
[[ -f "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
 
great :)
yeah strange
 
Almost identical to what your output is above. Is .bash_profile ignored for root users in Ubuntu?
it appeared to read what you typed above in .bashrc
 
I really dont know the difference
but I have it in .bashrc and it works
 
ok well thanks for the tip. it worked. I will mark your answer correct, but perhaps you can copy this solution to your answer. thanks.
 
7:12 AM
Sure.. Happy to help :)
 

last day (14 days later) »