I just recently installed rvm, and I’m trying to install a version of ruby using:
rvm install ruby-1.9.1
I’m getting a bunch of errors that seem to stem from this:
Fetching yaml-0.1.4.tar.gz to /usr/share/ruby-rvm/archives
....
Warning: Failed to create the file yaml-0.1.4.tar.gz: Permission denied
So, I look at the permissions for directory /usr/share/ruby-rvm/archives. It looks like this:
drwxrwsr-x 24 root rvm 4096 2012-02-26 13:29 archives
Ok fine. So I add myself to group rvm:
sudo usermod -G rvm jarrett
Then try again. No dice – I’m getting the same error. I then try this:
sudo usermod -a -G rvm jarrett
Still doesn’t work. So, I then change the group of /usr/share/ruby-rvm to jarrett:
sudo chgrp -R jarrett /usr/share/ruby-rvm
And now it works fine.
So, my question is: Why in the world wasn’t the rvm group working???
The problem is you need to relogin after changing user groups.
You can validate with
idif user has the group assigned or not.It’s on of the basic problems of groups, they are processed during login and then inherited from the first program (like Graphical session). To make the given rights in work you need to close all previously opened programs (logout) and open them again (login).