I need your help on how to check ruby version installed on my system and same as rails. And maybe remove them if necessary if.
You can find your ruby and rails versions by running:
ruby -v rails -v gem uninstall rails # to uninstall
And to uninstall ruby, you'd just follow the uninstall instructions from rbenv, rvm or whatever you used to install it.
As a side note, you don't want to remove any Ruby that comes pre-installed on your system (like macOS has a Ruby pre-installed) because the operating system depends upon it.
Join 29,763+ developers who get early access to new screencasts, articles, guides, updates, and more.