I have been trying to get RVM properly installed on my system for 10 hours. The problem is, that when ever I run the command to download the install script I get this:

edu@edu-VirtualBox:~$  bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
mkdir: cannot create directory `/usr/share/ruby-rvm': Permission denied

If I run the command with sudo, I can get it installed, but then that leads to a whole host of other issues. Every tutorial I read says that you should not be installing rvm with sudo for a single user install.

Why can I seem to get it installed without running sudo?

  • Question - do you absolutely need to install rvm system wide? Because its recommended that you install it per user. – jrg Feb 1 '12 at 19:04
  • 1
    no sir I don't. I don't know why it keeps trying to install it system wide. How do I enforce that it gets installed in $Home? – Guided33 Feb 1 '12 at 19:12
  • Let me write an answer really quick about how to do this. – jrg Feb 1 '12 at 19:21
  • /usr/share/ruby-rvm is a broken path, use this answer to fix: stackoverflow.com/questions/9056008/… – mpapis Feb 1 '12 at 19:37
  • @mpapis Except that he doesn't need a system wide RVM. – jrg Feb 1 '12 at 19:59

As I documented here in another question, this should install RVM on a per-user basis.


tl;dr remove the /etc/rvmrc file and restart, then install again.

You must have installed the ruby-rvm package at some point which creates a /etc/rvmrc file which sets the rvm_path environment variable to /usr/share/ruby-rvm which requires root privileges. To remove the ruby-rvm package run sudo apt-get purge ruby-rvm this is required even if you already ran an apt-get uninstall (since /etc/rvmrc is considered a configuration file)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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