$ gem install rails
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0 directory.
$ sudo gem install rails
sudo: gem: command not found
$ gem -v
2.6.12
Why sudo gem install rails
result in command not found?
How to install rails now?
user@debian:~$ su root
Password:
root@debian:/home/user# gem install rails
bash: gem: command not found