Keep track of any errors that occur as you progress through the rails tutorial. The hardware uses MacBook Air, and the development environment uses VScode.
2020.7 Currently, rails6 is the latest version, but the free version of the rails tutorial is compatible with rails5, so install rails5.
** Ruby is installed using the gem command. ** **
$ gem install rails -v 5.1.6
As for where to run gem install, I ran it in my home directory. (You can move it by running $ cd ~ or cd.) After a lot of research, I couldn't find an article that describes where to run: sob:
** Naturally the engineer knows?
Going back, when I run the command above, I get the following error:
$ gem install rails -v 5.1.6
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
This is ** not authorized! The error is **.
MacOS has the ability to not allow any material changes to the system other than those who are authorized as administrators. An error has occurred because it has been blocked by this.
So add a command called ** sudo. ** **
$ sudo gem install rails -v 5.1.6
When the ** sudo command ** determines whether the user who executed the command ** has administrator privileges (whether the account has a password set) ** and has administrator privileges. , The command is executed.
At that time, you will be asked to enter the password, so ** Enter the password for logging in to your computer. ** **
If you find it useful, I would be grateful if you could click the ** LGTM button. ** ** Let's do our best to learn Rails together! : raised_hand_tone1:
Recommended Posts