[Error resolution] How to resolve the error "Could not find a JavaScript runtime." After upgrading Catalina!

error contents

After upgrading from macOS Catalina 10.15.3 to 10.15.6, when I tried $ bin / rspec, the following error occurred.

terminal


$bin/rspec
/.../.../.../vendor/bundle/ruby/2.5.0/gems/execjs2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': 
Could not find a JavaScript runtime. 
See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

I'm getting an error that the JavaScript runtime cannot be found.

environment

--macOS Catalina 10.15.6 (after version upgrade)

Solution

** Conclusion **: Added "gem'mini_racer', platforms :: ruby" to Gemfile

If you look at the error log, you can see the link on Github, so check the link. After checking, it seems good to add a gem called mini_racer to the Gemfile.

Gemfile


(abridgement)
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
(abridgement)

Uncomment this part of the Gemfile. Then do $ bundle install and When I tried $ bin / rspec again, the test ran normally.

Recommended Posts

[Error resolution] How to resolve the error "Could not find a JavaScript runtime." After upgrading Catalina!
How to deal with errors in Rails s could not find a JavaScript runtime.
[Rails] What to do if you get an error saying "Could not find a JavaScript runtime." When executing the rails s command on Catalina
[Error] How to resolve the event that the screen does not transition after editing
Many error lines ... Rails server does not start 2. "Autodetect': Could not find a JavaScript runtime."
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
Error with bundle install after upgrading to Catalina
Difference between Java and JavaScript (how to find the average)
How to find the average angle
[Docker] could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network error
How to interact with a server that does not crash the app
[Docker] How to solve the error function not implemented @ io_fread ~ [Super easy]
How to find out the Java version of a compiled class file
What I did when I was addicted to the error "Could not find XXX in any of the sources" when I added a Gem and built it
How to resolve the error'ActionView :: Template :: Error (The asset "application.css" is not present in the asset pipeline.'" When precompiling Rails assets
How to find the tens and ones
gradle Could not find tools.jar. Error countermeasures
How to resolve the "OpenSSH keys only supported if ED25519 is available" error
How to find the distance and angle between two points on a plane
How to find the total score and average score
How to find the total value, average value, etc. of a two-dimensional array (multidimensional array)-java