Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExecJS::RuntimeUnavailable in Rails

I am getting this error while trying to run a rails app.

ExecJS::RuntimeUnavailable in Pages#home

I installed rubyracer but didn't help me.

<%= javascript_include_tag 'application', 'data-turbolinks-track' =>    true %>

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

like image 634
Suraj Avatar asked Nov 16 '25 11:11

Suraj


1 Answers

Try installing Node.js:

brew install node # For Mac OSX
sudo apt-get install nodejs # For Ubuntu

See other ways of installing Node.js in your system.

Then, re-start your server. This should fix your issue.

like image 169
K M Rakibul Islam Avatar answered Nov 18 '25 04:11

K M Rakibul Islam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!