Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails - Could not find a JavaScript runtime?

I created a new Rails project using rails 3.1.0.rc4 on my local machine but when I try to start the server I get: Could not find a JavaScript runtime. See here for a list of available runtimes. (ExecJS::RuntimeUnavailable)

Note: This is not about Heroku.

like image 362
Michael Durrant Avatar asked Sep 26 '22 06:09

Michael Durrant


1 Answers

Installing a javascript runtime library such as nodejs solves this

To install nodejs on ubuntu, you can type the following command in the terminal:

sudo apt-get install nodejs

To install nodejs on systems using yum, type the following in the terminal:

yum -y install nodejs
like image 499
theTuxRacer Avatar answered Oct 17 '22 15:10

theTuxRacer