Ruby on Rails : Could not find a JavaScript runtime
[root@slave2 first]# rails s
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/execjs-2.2.1/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from/usr/local/rvm/gems/ruby-2.0.0-p481/gems/execjs-2.2.1/lib/execjs.rb:5:in `
[root@slave2 first]# yum install nodejs
Loaded plugins: fastestmirror, prestoLoading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * epel: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.comSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package nodejs.x86_64 0:0.10.29-1.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================================= Package Arch Version Repository Size=======================================================================================================================================Installing: nodejs x86_64 0.10.29-1.el6 epel 498 kTransaction Summary=======================================================================================================================================Install 1 Package(s)Total download size: 498 kInstalled size: 1.5 MIs this ok [y/N]: yDownloading Packages:Setting up and reading Presto delta metadataProcessing delta metadataPackage(s) data still to download: 498 knodejs-0.10.29-1.el6.x86_64.rpm | 498 kB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : nodejs-0.10.29-1.el6.x86_64 1/1 Verifying : nodejs-0.10.29-1.el6.x86_64 1/1 Installed: nodejs.x86_64 0:0.10.29-1.el6 Complete!