Post

railsを動かしたら、coffee-railsでエラーが発生

railsを動かそうとしたら、エラーが発生

$ rails -T => rails aborted! Bundler::GemRequireError: There was an error while trying to load the gem 'coffee-rails'. 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:

nodejsをインストールする

$ sudo yum install epel-release $ sudo yum install nodejs --enablerepo=epel

node.jsをyumでインストールする(centos6.5) - Qiita

トラブルシューティング

yumでインストールできない

$ sudo yum -y install nodejs => Loaded plugins: etckeeper, fastestmirror, security Loading mirror speeds from cached hostfile Setting up Install Process No package nodejs available. Error: Nothing to do

別方法のインストール方法

$ curl --silent --location https://rpm.nodesource.com/setup | bash - $ sudo yum install -y nodejs
[パッケージマネージャを利用した Node.js のインストール Node.js](https://nodejs.org/ja/download/package-manager/)
This post is licensed under CC BY 4.0 by the author.