High Sierra user trying to set up a new user for Rails, without interfacing w/ previous users I'm getting this error when I'm trying to use Rails. It seems there are problems with using local files.

pasting below to show the versions of ruby and rails

~ $ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]
~ $ rails -v
Rails 5.1.4


pasting the common error when trying to use rails or ruby

~ $ gem uninstall rails
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/lib/ruby/gems/2.4.0 directory.
You could try a tool that creates a virtual environment. That would allow you to download just the tools you need - correct versions, etc, and it's self-contained. That way you don't need to worry about the system's versions of your dependencies, nor the other users on your system. Apparently RVM is the Ruby version of what I had in mind.