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.