Rails Tutorial Chapter 3
$ rails _6.0.3_ new sample_app
When I run, an error occurs and the app is not created.
The $ rails _6.0.3_ new sample_app
command works fine and the app is created.
$ rails _6.0.3_ new sample_app
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
It seems that Yarn is not installed. I was asked to install Yarn. So, install Yarn with the Homebrew brew command.
$ brew install yarn
bash: brew: command not found
Next, I was told that there is no brew command. I think that there is no Homebrew, so I will install Homebrew.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
 Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
I was told that my PATH wasn't working. So let's go through the PATH.
$ echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Homebrew is now installed and Yarn is also installed.
$ rails _6.0.3_ new sample_app
The app has been created properly! !!
In order to create an app with the $ rails new app name
command, you need to install Yarn.
You can also install Yarn with npm, but you can install it with Homebrew.
https://qiita.com/jun3030/items/afcd3287285a57b32ccb
Recommended Posts