A story that an inexperienced beginner was having trouble setting up Rails Server.

Nice to meet you. It's Takuma. I would like to output the experience that I was able to solve because I had a problem in my own way.


While recommending Progate's Web Development Path, some things went wrong, so I'd like to share the solution I've done. Since the content is shallow and fluffy, I would appreciate it if you could point out.


Web development path (Ruby on Rails) STEP4, [Let's build an environment for Ruby on Rails! (macOS)] Finally, set up a Rails server in the browser and finish. However, I can't stand even if I enter a command in the editor! !! In particular

Could not find a JavaScript runtime.

Was displayed and Rails could not be displayed on the browser. I didn't have much experience playing with the terminal, so when I googled the error code, I found the following article.


Apparently it's talking about JavaScript. Then, when I googled about "the rubyracer" that was in the error code, I found the following article.

As a person who had no knowledge about building a development environment, I was able to continue learning without being depressed by reading this article.

The point is that building a development environment is a demon. ruby has a library management system called rubygems. Rails requires a lot of libraries (gems) to be installed before booting, which often fails with unreasonable errors. As you get used to it, you will understand the countermeasures, but if you are a beginner, you have no choice but to stand up.

As for the content, the part called ** therubyracer ** is old, and the new part called ** mini_racer ** is widely used. → I was wondering if it might have something to do with JavaScript because of the technology from the front, which is connected to Apple's Sidecar and the vehicle.


When I check the contents of sample_app <Gemfile created in the lesson again, ** mini_racer ** is commented out ... Can you uncomment this guy and save the edits? It seems to be ** "bundle update" ** and updated. Later, when I executed ** "Rails s" **, I was able to successfully start the Server in the browser.


This time, I wrote an article about the solution to the problem for the first time, but I have to reflect on the contents of the gem and the awareness of the flow line if someone who is stumbling in the same place as me refers to this article. There were many improvements. I will continue to produce such output in the future.

Recommended Posts

A story that an inexperienced beginner was having trouble setting up Rails Server.
When I personally developed with Rails, it was a painful story that Rails was hit very much
A story I was addicted to in Rails validation settings
[Docker] The story that an error occurred in docker-compose up
The story I was addicted to when setting up STS