JavaScriptランタイムが無いというエラーでrails serverが起動しない場合

タグ: ruby / 公開: 2014-03-08

rails newしたプロジェクトを、rails serverでさあ起動! というタイミングで以下のエラーが出て出鼻をくじかれた。

/var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephensos for a list of available runtimes. (ExecJS::RuntimeUnavailable)

JavaScriptランタイムがないという。railsの実行にはNode.jsのようなJavaScriptの実行環境が必要だ。Node.jsをインストールすると解決。

git clone git://github.com/joyent/node.git
cd node
./configure
make
sudo make install
この記事をSNSでシェアする
タイトルとURLをコピーする
または投稿画面を開く
Author
Icon
ぺけみさお / xmisao
プログラマ。
Subscription
Recent articles
Related to ruby