Rails - 找不到JavaScript运行时? [英] Rails - Could not find a JavaScript runtime?
本文介绍了Rails - 找不到JavaScript运行时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在本地计算机上使用 rails 3.1.0.rc4
创建了一个新的Rails项目但是当我尝试启动服务器时,我得到:
不能找到一个JavaScript运行时。有关可用运行时的列表,请参见此处。 ( ExecJS :: RuntimeUnavailable
)
I created a new Rails project using rails 3.1.0.rc4
on my local machine but when I try to start the server I get:
Could not find a JavaScript runtime. See here for a list of available runtimes. (ExecJS::RuntimeUnavailable
)
注意:这不是关于Heroku的。
Note: This is not about Heroku.
推荐答案
安装一个javascript运行时库,例如nodejs解决了这个问题
到在ubuntu上安装nodejs,你可以在终端中输入以下命令:
Installing a javascript runtime library such as nodejs solves this
To install nodejs on ubuntu, you can type the following command in the terminal:
sudo apt-get install nodejs
要使用yum在系统上安装nodejs,请在终端中键入以下内容:
To install nodejs on systems using yum, type the following in the terminal:
yum -y install nodejs
这篇关于Rails - 找不到JavaScript运行时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文