rvm / ubuntu_rvm

Ubuntu package for RVM
https://launchpad.net/~rael-gc/+archive/ubuntu/rvm
Apache License 2.0
694 stars 84 forks source link

`Following files may not be writable, so sudo is needed` after upgrade to 1.29.10 #45

Closed ShockwaveNN closed 4 years ago

ShockwaveNN commented 4 years ago

Description

I just received update on my kubuntu 18.04 via apt-get from rvm 1.29.9-3 to 1.29.10-1 and now in every terminal I opened I receive this error:

Following files may not be writable, so sudo is needed:
  /home/user/.rvm/gems/ruby-2.6.5/environment

There is was no such error with 1.29.9-3

Environment info

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
raelgc commented 4 years ago

Hi @ShockwaveNN and thanks for reporting this issue.

Please, can you try run this command?

rvmsudo rvm cleanup all
ShockwaveNN commented 4 years ago

@raelgc Yeah, thanks, seems this helped with my issue and error message is gone

Maybe this should be added in Readme that

In case in any error message please try to run rvmsudo rvm cleanup all before reporting issue

ShockwaveNN commented 4 years ago

Oh, sorry this error gone on opening new terminal, but still present if I call any ruby program. Except ruby itself image

raelgc commented 4 years ago

@ShockwaveNN It was already added in the README file.

Which is the permission for this environment file?

ShockwaveNN commented 4 years ago

@raelgc Now permissions is:

-rw-rw-r-- 1 root root 469 мар 26 17:32 /home/lobashov/.rvm/gems/ruby-2.6.5/environment

and seems everything is fine.

It was already added in the README file.

Yeah, it's in 3. Cannot upgrade to rvm master due Operation not permitted paragraph. But I think there should be note that in all troubleshooting sessions this command should be performed, if I understand that right

raelgc commented 4 years ago

@ShockwaveNN I agree. I just improved the troubleshooting section item 3.

ShockwaveNN commented 4 years ago

@raelgc to be clear (First I was thinking that reboot is helped me, but actually not) this problem is still actual for me

raelgc commented 4 years ago

@ShockwaveNN Can you try change the owning of the .rvm content folder back to you?

sudo chown -r lobashov:lobashov /home/lobashov/.rvm/
ShockwaveNN commented 4 years ago

@raelgc Yeah, seems this fixed my problem

Only you got a typo - -R, capitall letter like this:

sudo chown -R lobashov:lobashov /home/lobashov/.rvm/

Thank you, I'll close this issue