RHEL安装rails后启动报错
[root@redhat7 demo]# rails server
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:86:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/usr/local/rvm/gems/ruby-2.4.1/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/usr/local/rvm/gems/ruby-2.4.1/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/usr/local/rvm/gems/ruby-2.4.1/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/gems/uglifier-3.2.0/lib/uglifier.rb:5:in `require'
/usr/local/rvm/gems/ruby-2.4.1/gems/uglifier-3.2.0/lib/uglifier.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `require'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `block in require'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `require'
/usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler.rb:114:in `require'
/usr/local/jianbo/demo/config/application.rb:7:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
/usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/usr/local/jianbo/demo/bin/rails:9:in `require'
/usr/local/jianbo/demo/bin/rails:9:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/usr/local/jianbo/demo/bin/spring:15:in `require'
/usr/local/jianbo/demo/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `block in require'
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `require'
from /usr/local/rvm/gems/ruby-2.4.1/gems/bundler-1.16.0.pre.2/lib/bundler.rb:114:in `require'
from /usr/local/jianbo/demo/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from /usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from /usr/local/jianbo/demo/bin/rails:9:in `require'
from /usr/local/jianbo/demo/bin/rails:9:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /usr/local/jianbo/demo/bin/spring:15:in `require'
from /usr/local/jianbo/demo/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
解决办法
1.安装execjs、therubyracer
gem install execjs
gem install therubyracer
2.安装nodejs
由于RHEL中没有这个包,其他安装方式太麻烦,找了半天决定使用
EPEL(什么是EPEL,参考我另一篇http://www.cnblogs.com/jasonboboblog/p/7535223.html)
首先要安装epel,直接用yum install epel
安装完后再用 yum install nodejs 就完成了,之后再用rails server
大功造成
RHEL安装rails后启动报错的更多相关文章
- 安装mongodb后启动报错libstdc++
安装mongo后启动报错如下图 显然说是libstdc++.so文件版本的问题,这种一般都是gcc版本太低了 接着查询gcc的版本 strings /usr/lib/libstdc++.so.6 ...
- linux安装tomcat后启动报错Cannot find ./catalina.sh的解决方法
linux安装tomcat后启动报错: Cannot find ./catalina.shThe file is absent or does not have execute permissionT ...
- Docker安装完成后启动报错:Failed to start Docker Application Container Engine
报错如下:显示没有启动 先关闭防火墙:防火墙关闭指令请看 <a href="Linux防火墙篇">https://www.cnblogs.com/szx666/p/1 ...
- centos7 安装docker后启动报错
启动docker $ sudo systemctl start docker 报错. 查看状态: $ systemctl status docker.service -l 加 -l 有的行信息很长 ...
- eclipse tomcat路径更改后启动报错
eclipse tomcat路径更改后启动报错 CreateTime--2018年5月3日14:48:22 Author:Marydon 1.情景还原 2.原因 本地的tomcat路径修改后,ec ...
- dialogic d300语音卡驱动重装后启动报错问题解决方法
dialogic d300 驱动重装后 dlstart 报错解决 问题描述:dlstart 后如下报错 [root@BJAPQ091 data]#dlstop Stopping Dialogic ...
- gitblit在windows10上的安装及服务启动报错处理
折腾一下午算是装好了,心情不错决定分享一下.安装步骤大同小异网上都有,主要是Failed creating java 这个报错,百度出来的没有一个能给我解决的,摸索半天找出一个自己的方式.为报错而来的 ...
- docker安装后启动报错
docker安装后启动不起来: 查看日志 /var/log/message 其中有一行为: Your kernel does not support cgroup memory limit ...
- keepalived yum安装后启动报错解决
[root@centos8 ~]yum install keepalived -y [root@centos8 ~]systemctl start keepalived.services [root@ ...
随机推荐
- 从AppleWatch4发布后对手股价大跌看可穿戴市场未来
万众瞩目的苹果秋季发布会终于落下了帷幕,这场发布会既有惊喜,也有遗憾.遗憾的是新款iPad Pro.廉价版Macbook air没有亮相.iPhone系列价格较贵等,惊喜的则是iPhone的处理器依然 ...
- 在设备上启用 adb 调试,有一个小秘密
要在通过 USB 连接的设备上使用 adb,您必须在设备的系统设置中启用 USB 调试(位于开发者选项下). 在搭载 Android 4.2 及更高版本的设备上,“开发者选项”屏幕默认情况下处于隐藏状 ...
- UVA 10534 LCS变种题
求一个序列中 的2*n-1个数字 ,前n+1个数字为严格升序 后n+1个为严格降序,求最长的长度 一开始还没想清楚怎么解,其实就是一个LCS问题,从头到尾以及反序求一下LCS 由于 d[i]为包含了自 ...
- UVA 10891 SUM游戏 DP
刚看到这个题目不知道怎么个DP法,有点难想到 解法如下 设置dp[i][j]代表i到j这段子序列能获得的最大值,这样,枚举m=min(m,dp[i+1到j][j],dp[i][i到j-1]),m就代表 ...
- css3 flex布局详解
原文链接: http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_source=tuicool https://www.cnblog ...
- java this的用法以及原理
/** * this存在方法中,在方法中被调用. * 且是非static方法中被调用.(this 表示这个类的当前实例,而静态方法不依赖于该类的任何实例,随着类产生而装载,因此方法内不能引用 this ...
- JVM探秘:jmap生成内存堆转储快照
本系列笔记主要基于<深入理解Java虚拟机:JVM高级特性与最佳实践 第2版>,是这本书的读书笔记. jmap 命令用来生成内存堆转储快照,一般称为heapdump或dump文件. 除了使 ...
- 十、GUI编程
GUI图形用户界面编程 GUI编程类似“搭积木”,将一个个组件放到窗口中,并通过增加“事件处理”,完成一个个程序.例如:记事本.word.画图工具等. tkinter模块 tkinter是 ...
- Codeforces 1288D - Minimax Problem
题目大意: 给定n个序列,每个序列元素个数严格相等于m 你需要找到两个序列a[i]和a[j],使其每个对应位置的元素取大后得到b序列 b[k]=max(a[i][k],a[j][k]) 且让b序列中 ...
- MySQL--存储引擎的特性
常用存储引擎的对比 特点 MyISAM InnoDB MEMORY MERGE NDB 存储限制 有 64TB 有 没有 有 事务安全 支持 锁机制 表锁 行锁 表锁 表锁 行锁 B树 ...