0

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.

1 Answers1

0

Do

rvm implode

and then remove exported variables from below files

~/.bashrc
~/.bash_profile
~/.profile
adityapandit17
  • 356
  • 1
  • 8