Starting up a server that was possible with windows cannot be done with a Mac that I just bought. As a result of various investigations, I managed to do it, so I summarized it.
Progate's "Let's build a Ruby on Rails environment! (MacOS)", proceed to "5. Set up a Rails server locally", and when the rails s command is executed, the following error occurs.
% rails s
(Abbreviation)
Could not find a JavaScript runtime.
See https://github.com/rails/execjs
for a list of available runtimes.
(ExecJS::RuntimeUnavailable)
Even if I enter localhost: 3000 in the browser, it is not displayed with an error. Apparently there is an error because there is no JavaScript runtime. I found the following article when I searched without knowing the runtime.
https://wa3.i-3-i.info/word13464.html
According to the article
What is runtime (English: runtime)?
When running a program (at runtime).
Or
Parts required to run programs
And that. In other words Ruby itself does not have a function to execute JavaScript, and a runtime is required to execute it </ b> It seems that.
For the time being, I searched on the net for Could not find a JavaScript runtime. And found an article on the Ruby on Rails tutorial.
https://railstutorial.jp/chapters/beginning?version=4.0#sec-rails_server
According to the article
(If you get an error that the JavaScript runtime is not installed, check the installable runtime on the execjs page on GitHub. Node.js is especially recommended).
And that. Immediately access the GitHub site in the error text.
https://github.com/rails/execjs
Click Node.js, download from the official website and install. After that, when I ran rails s with the command again, the server started up.