LoginSignup
13
6

More than 3 years have passed since last update.

Catalinaのバージョンアップしたらrails sできなくなったけど、Node.jsのインストールで解決!

Last updated at Posted at 2020-03-29

筆者の環境

macOS Catalina バージョン 10.15.4
使用言語:Ruby、JavaScript

エラー内容

不注意により、macOSがCatalina バージョン10.15.4に上がってしまった。

それから実装中のアプリでrails sすると、以下のエラーメッセージが表示されサーバーが起動しなくなった。

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

これで解決!

Node.jsをインストール

左側の12.16.1の方はインストールしても開けず、
右側(最新版)をインストールしたらrails s成功しました!

スクリーンショット 2020-03-29 19.12.24.png

番外編

他にも対処法はいくつかあり、therubyracerというGemのインストールでも解決できるようです。(参考リンクご参照ください)

現在、チーム開発中だったので、自分以外の複数端末への影響を考え今回はGem以外の方法を選択しました。

参考

にさせていただきました。ありがとうございます。
https://qiita.com/azusanakano/items/771dc9919f347de061d7

13
6
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
13
6