文档章节

Ruby on Rails : Could not find a JavaScript runtime

wild-life
 wild-life
发布于 2015/02/24 13:02
字数 492
阅读 7
收藏 0
[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!




本文转载自:http://monkeyzhu.blog.51cto.com/5764358/1553157

wild-life
粉丝 18
博文 94
码字总数 56147
作品 0
成都
技术主管
私信 提问
Rails 3.1.0.rc4报错execjs Could not find a JavaSc...

ruby 1.9.2 下运行rails 3.1.0.rc4,报错Could not find a JavaScript runtime 其实解决办法在报错位置就可以看到,https://github.com/sstephenson/execjs 下面只是把解决办法贴出来,就是在...

ryany
2011/09/18
166
0
Rails Everyday: SJR 结合 Stimulus 构建可维护的JavaScript代码

这几个月都在使用 DHH 今年新发布的 StimulusJS 框架来写 Web 程序, 真的感觉很好, 感觉开发Web项目充满了生产力, 而不像 AngularJS/React 前端框架, 看着技术吊炸天, 但是真正要写项目的时候...

ManateeLazyCat
2018/09/21
0
0
推荐 7 款最好的 Ruby on Rails 集成开发环境

Ruby 是个动态面向对象、通用的编程语言。它支持多种编程范式,包括面向功能和面向对象。同时它也包括一个动态类型系统和自动内存管理。 编辑器和集成开发环境(IDE)有些不同,编辑器是用来...

oschina
2014/03/06
21.4K
15
用 Webpack 和 ES6 转换快速开发 Rails 的富客户端

Fast Rich Client Rails Development With Webpack and the ES6 Transpiler 有更好的方式把 JavaScript 生态引入 Rails。 你有没有: 想知道是否有更好的方式在现有 Ruby on Rails 工程下使用...

开源中国匿名会员
2015/06/09
471
0
Ubuntu 14.04 Ruby,ROR环境搭建

在看国外一个物联网平台thingsquare,因为它是用Ruby写的,所以就装个Ruby研究下。下面是搭建步骤。 步骤0 - 安装系统需要的包 # For Mac # 先安装 Xcode 开发工具,它将帮你安装好 Unix 环境...

quanpower
2014/08/02
1K
0

没有更多内容

加载失败,请刷新页面

加载更多

shangcheng-my

1.数据库主键、外键类型为bigint,那么在后台应该用什么类型的变量定义? 后台用string接收,因为前段传过来的一般都是json字符串,后台直接接收,mysql是可以吧数字类型的字符串转换为对应的...

榴莲黑芝麻糊
昨天
2
0
微服务架构依赖图

基于spring-cloud-alibaba + dubbo

龙影
昨天
5
0
Centos7 安装zabbix-agent

rpm -i https://repo.zabbix.com/zabbix/4.2/rhel/6/x86_64/zabbix-release-4.2-2.el6.noarch.rpm 可以到https://repo.zabbix.com/zabbix找到对应的版本 yum install zabbix-agent -y 出现E......

abowu
昨天
8
0
文本编辑器GNU nano 4.4 发布

GNU nano 4.4 "Hagelslag" 更新日志: 启动时,光标可以放在第一个或最后一个出现位置 字符串前面带有+/string 或 +?string的字符串。 发生自动硬包装时((--breaklonglines),任何前导引号...

linuxCool
昨天
7
0
你知道字节序吗

字节序 最近在调一个自定义报文的接口时,本来以为挺简单的,发现踩了好几个坑,其中一个比较“刻骨铭心”的问题就是数据的字节序问题。 背景 自定义报文,调用接口,服务端报文解析失败 iO...

杭城小刘
昨天
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部