I have Ruby and gem, but this problem arises when I run’ GEM INSTALLARIS’.
Because the current user of your system is not right/Library/Ruby/Gems/2.0.0Write permissions for directories. You can usesudo gem install railsGet root permission to operate. But ..This is not recommended.
The Ruby you are using now is Ruby built into the system, which is not conducive to the upgrade and switching of Ruby versions in the future, and is not very convenient for gem management. It is recommended that you use Ruby version management tools such as rvm or rbenv to install and manage your Ruby.