Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed RVM (ruby version manager) on a production server (with CentOS).

I have installed it as a user (e.g. foobar) and not as root. (Is this a bad idea?)

Now everything works correctly except that whenever I ssh to my server (e.g. ssh foobar@example.com) RVM doesn't get loaded and I always have to run a login shell (e.g. bash --login) to start using the correct version of ruby and gems.

.bash_profile and .bashrc for user foobar seems to be properly configured.

I would like to know if this is my fault (a bad configuration), or everyone using RVM is facing this issue.

share|improve this question
    
Exactly how did you install rvm? –  Michael Hampton Feb 16 '13 at 9:31
    
$ \curl -L https://get.rvm.io | bash -s stable --ruby (as seen here: rvm.io) –  collimarco Feb 16 '13 at 9:51
    
I have executed that command through ssh (ssh foobar@example.com and then I executed that command from the shell; nothing else). –  collimarco Feb 16 '13 at 9:53
    
So what you need to sort out is: why you don't get a login shell when you ssh to the remote host. Contact the system administrator of the remote machine. –  Michael Hampton Jul 10 '13 at 23:13

1 Answer 1

I do not have this problem on my CentOS 6. You need to have a login shell for rvm (if you have installed it as root) installs a rvm.sh script under /etc/profile.d. This is read by login shells only.

share|improve this answer

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.