Ruby on Railsをインストールしていた際に
bundle instalで以下のエラーが発生した。
root@LAPTOP-54LE8E00:/mnt/c/Users/maruyama/rails/twins_community# bin/rails s
/root/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
・・・・・・
・・・・・・
therubyracerが必要らしいので、
Gemfileに以下のgemを追加することで解決しました。
gem 'therubyracer'
上記を追加後にbundle instalを実行することで
問題なく実行!