Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed rvm, like you're supposed to do (apparently), avoiding apt-get to handle my ruby installations (as @btelles points out here: http://stackoverflow.com/questions/2225881/passenger-installation-with-nginx-fails)

However, I can only see rvm when I log in remotely via ssh. When I log in locally, there's no indication of rvm anywhere on the system. When I type into a terminal when logged in locally:

which rvm

The result is nothing. When I run the same thing from the command line remotely via ssh, I get:

xxx@xxxx:~$ which rvm
/usr/local/rvm/bin/rvm

What should I do to get ruby running from the local machine?

EDIT: started a bounty because I REALLY need this to be solved. Ubuntu should play nice with rvm in rvm's default installation, and the fact that it does not is extremely frustrating, to say the least.

share|improve this question

2 Answers 2

While I don't know why it's doing this, I know how to fix it:

This is a path issue. You need to add the following to the files /etc/bash.bashrc and ~/.bashrc:

PATH=$PATH:PATH=$PATH:/usr/local/rvm/bin

You'll need to use 'sudo' privileges in order to do that for /etc/bash.bashrc, it's a protected file.

Also, you should report this bug (since I'm pretty sure that's what it is) here on RVM's Github project.

share|improve this answer
    
but! why does it work from ssh, and why isn't this automatically the default? –  mmr Sep 13 '11 at 18:13
    
1. No idea. 2. The RVM install doesn't handle $PATHs for you. You have to add those manually. The reason why RVM doesn't handle that is because it's used on everything - Fedora, Ubuntu, Mac, openSUSE, Debian, you name it it's got RVM, and adding the path automatically as part of the install process is rather difficult (to say the least). –  jrg Sep 13 '11 at 18:15
    
I guess my concern has to do with breaking things. Last time I upgraded ubuntu from 9 to 11, scponly broke. Now, rvm is 'broken', in the sense that it works fine when I log in remotely, but the same paths aren't used when I log in locally. I'd call that seriously, seriously broken. Do I get any kind of guarantee that a year and a half from now, the paths won't have migrated again? How can this kind of system be deployed on any kind of enterprise scale? –  mmr Sep 13 '11 at 18:19
    
Can I invite you to the chatroom so we can discuss this? :) –  jrg Sep 13 '11 at 18:22
2  
ssh uses login shell and rvm adds itself to .bash_profile, check for more info here: rvm.beginrescueend.com/support/faq/#shell_login –  mpapis Feb 1 '12 at 21:32

/usr/local/ isnt the default binary path in Ubuntu. I think it's a path problem, somehow your SSH connected shell has a different path variable.

echo $PATH
share|improve this answer
    
What is the default binary path? I guess more philosophically, why buck the standard trend and have a different default, making it more difficult to use the same libraries as everyone else? Should I be modifying my $PATH to include /usr/local? –  mmr Sep 9 '11 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.