简体   繁体   中英

Can't remove rvm from root

So I made the mistake of using sudo in rmv ruby, which created a lot of problems.

I finally removed rmv using rmv implode , and installed another ruby after installing rbenv, but the problems still persisted.

Finally on checking environment variables, I found:

rvm_prefix=/usr/share
MY_RUBY_HOME=/usr/share/rvm/rubies/ruby-2.7.0
rvm_bin_path=/usr/share/rvm/bin
GEM_HOME=/home/devesh/.rvm/gems/ruby-2.7.0
GEM_PATH=/home/devesh/.rvm/gems/ruby-2.7.0:/home/devesh/.rvm/gems/ruby-2.7.0@global
rvm_path=/usr/share/rvm
MY_RUBY_HOME=/usr/share/rvm/rubies/ruby-2.7.0

These variables still exist, and are probably the reason for malfunctioning of gem commands like:

sudo bundle install
sudo: bundle: command not found

I have been stuck in this from morning. Help would be appreciated.

Do

rvm implode

and then remove exported variables from below files

~/.bashrc
~/.bash_profile
~/.profile

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