简体   繁体   中英

RVM system wide install problems

I installed RVM system wide on Fedora 14, and I pretty much followed the guide to the letter. When I tried it out though:

$ type rvm | head -n1
rvm is /usr/local/bin/rvm

Most commands appear to work fine, but changing Rubies doesn't work properly. I have to keep logging off and back in for it to switch, and that doesn't seem to work every time.

Here's exactly what I did:

  • bash < <( curl -L http://bit.ly/rvm-install-system-wide ) as root
  • add my own user to the rvm group
  • add

     [[ -s "/usr/local/lib/rvm" ]] && source "/usr/local/lib/rvm" 

    to the very end of ~/.bash_profile .

  • Log off and back in.

If I understood correctly, this is exactly what should be done. I made sure .bashrc doesn't contain a return statement.

I figure this has something to do with the environment variables that RVM sets up. Any thoughts?

Well, I found the answer.

The problem was that I was not running bash as a login shell. This basically means it doesn't execute my ~/.bash_profile.

Embarrassing thing is, on the very, very last point on the troubleshooting guide is written:

If you are using GNOME on Red Hat, CentOS or Fedora ensure that the Run command as login shell option is checked under the Title and Command tab in Profile Preferences. After changing this setting, you may need to exit your console session and start a new one before the changes take affect.

Looks like I didn't actually read the whole thing, but Wayne does need to put "Make sure you're running the shell as a login shell" on the guide itself, not just on the troubleshooting section.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM