码迷,mamicode.com
首页 > 编程语言 > 详细

Ruby on Rails : Could not find a JavaScript runtime

时间:2014-09-16 12:49:41      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:rails ruby ror

[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 `<module:ExecJS>‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/execjs-2.2.1/lib/execjs.rb:4:in `<top (required)>‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/uglifier-1.3.0/lib/uglifier.rb:3:in `require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/uglifier-1.3.0/lib/uglifier.rb:3:in `<top (required)>‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require‘
        from /root/rails/first/config/application.rb:7:in `<top (required)>‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap‘
        from /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>‘
        from bin/rails:4:in `require‘
        from bin/rails:4:in `<main>‘

[root@slave2 first]# yum install nodejs

Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * epel: mirrors.yun-idc.com
 * extras: mirrors.yun-idc.com
 * updates: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.29-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
 Package                       Arch                          Version                                 Repository                   Size
=======================================================================================================================================
Installing:
 nodejs                        x86_64                        0.10.29-1.el6                           epel                        498 k

Transaction Summary
=======================================================================================================================================
Install       1 Package(s)

Total download size: 498 k
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 498 k
nodejs-0.10.29-1.el6.x86_64.rpm                                                                                 | 498 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running 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!




Ruby on Rails : Could not find a JavaScript runtime

标签:rails ruby ror

原文地址:http://monkeyzhu.blog.51cto.com/5764358/1553157

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!