LoginSignup
0
0

More than 3 years have passed since last update.

【Rails】ExecJS::RuntimeUnavailableの解決方法

Last updated at Posted at 2020-06-14

解決策→mini_racerをインストールしよう

MacのOSアップデート後にrails sでサーバーを立ち上げようとしたところ、エラーが発生。

ターミナル
Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. 
(ExecJS::RuntimeUnavailable)

調べてみると、JavaScriptを実行するために必要なランタイムが無いぞ!と言っているらしい。

解決策を調べていると、どうやらエラー文にあるhttps://github.com/rails/execjsに利用可能なランタイムの一覧のリンクが表示されているらしい。

その中にある、gem 'mini_racer'が良さそうという情報があったので、bundle installすることに。
結果、無事にサーバーを立ち上げることができるようになりました!

結論

Gemfile
# 最下部に追加
gem 'mini_racer'

をbundle installしよう。

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