LoginSignup
0
0

More than 5 years have passed since last update.

bundle instalで発生したエラーの解決

Posted at

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を実行することで
問題なく実行!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0