Ran rails server - but could not find a Javascript Runtime - needs help


Hi Everyone,

I am trying to create my first rails app, but after running the rails server this is what I appeared at the bottom of the terminal: 1: from /home/daniel/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:5:in <module:ExecJS>' /home/daniel/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:inautodetect’: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

Can some body please help me out?


You need to install nodejs.

You can use nvm to install it which we recommend later in the JS section anyway https://github.com/nvm-sh/nvm Try using the installation instructions there.


Thanksoftomato let me try that method. I will come back to let you know if it work