gems/execjs-2.0.2/lib/execjs/runtimes.rb:51in 'autodetect': Could not find a JavaScript runtime.

 

解决方法:

1、安装execjs

  gem  install execjs

2、安装therubyracer

gem install therubyracer

 

3、在Gemfile文件中最后加入下面代码:

   gem 'execjs'

   gem 'therubyracer'

 

为了不每次都在Gemfile文件中加这2行代码可以 安装node.js

通过:sudo apt-get install nodejs