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.
--macOS Catalina 10.15.6 (after version upgrade)
** 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