Reputation: 191
I have read the related answers, but the content is too complicated and I am not sure how to do it.
Since I inherited an old project, I need to use Ruby version 2.3.1, I cannot install the latest version of Ruby, nor can I install the latest version of Rails (must match the Ruby version).
I installed Rails under the following instructions on the MacOS terminal:
gem install rails -v 4.2.2
But after a few lines of messages, an error message appears as follows
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
I'm not sure if I chose the wrong version of Rails, or there are other operational errors. Please tell me what should I do?
I just moved from Windows to MacOS.
Upvotes: 0
Views: 503
Reputation: 191
I added "--user-install" at the end of the original instruction to proceed to the next step:
gem install rails -v 4.2.2 --user-install
Upvotes: 2