RVM Issues During Ruby Installation (1.9.2)

I am trying to install ruby ​​through RVM and I get the following error and the logs are not quite clear as to what is happening, does anyone come across this? I seem to remember that Ruby should not be installed as root, but I am a little suspicious of the permission errors that I get.

**Installing Ruby from source to: /Users/mark/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)... ruby-1.9.2-p290 - #fetching ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied 0 8604k 0 16150 0 0 14980 0 0:09:48 0:00:01 0:09:47 26562 curl: (23) Failed writing body (0 != 16150) ERROR: There was an error, please check /Users/mark/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http. Trying http:// URL instead. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied 0 8604k 0 16150 0 0 24640 0 0:05:57 --:--:-- 0:05:57 28333 curl: (23) Failed writing body (0 != 16150) ERROR: There has been an error while trying to fetch the source. Halting the installation. ERROR: There has been an error fetching the ruby interpreter. Halting the installation.** 
+4
source share
4 answers

I had the same error message and resolved it by running sudo chown -R user:user /usr/local/rvm , where user is your registered user, after which I ran rvm install 1.9.2 and completed it successfully.

+16
source

Make sure you add the user to the rvm group. Also, make sure you log out and log in. Group memberships are processed at logon, so to write to / usr / local / rvm you must log out and then log in so that the OS recognizes that you are in rvm.

+2
source

The error seems to be

 Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied 

Have you tried to do something with sudo once? You want to make sure /Users/mark/.rvm/rubies/ is writable for your user.

+1
source

I like the solution above, but instead of using the user: user do user: rvm.

+1
source

All Articles