ERROR output as I try to install rails



I’m trying to instal rails
Trying to run the command

$ gem install rails

and that’s the output.

ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

how I take permissions ???


It looks like Ruby hasn’t installed properly as it’s trying to use the system default Ruby 2.3.0. You need to go back through the install instructions and make sure you have rbenv set up correctly so that you are using the latest Ruby


well, I reinstalled ruby. the $gem install rails ism running. Thank you