I think you are working on qpixel. While, working on a big project don't change their version. Just change your ruby version. To change ruby version you have to use
rvm install 2.6.6
rvm use 2.6.6
I think another type of login required in terminal (i forgot). If you can't execute above command normally than, try with
sudo. I am sure that sudo can't execute them also. So, at first login using
Then, execute those commands. I hope it will work now.