---
title: "Could not find a JavaScript runtime exejs"
author: "Crabby"
date: "2012-05-29T11:17:07Z"
tags: ["Rails"]
categories: ["编程语言"]
slug: "could-not-find-a-javascript-runtime-exejs"
draft: false
lastmod: "2012-05-29T11:17:07Z"
id: 1543510
url: "https://crabby.iteye.com/blog/1543510"
---

我在小本上新搭建 Ruby, Rails 运行环境, 系统为 Fedora 16
新建项目执行 $rails server 时报类似如下错误
`autodetect': Could not find a JavaScript runtime.

查看网上的解决方法

先安装
gem install execjs
gem install therubyracer

再安装
nodejs

安装 Node.js 可以参考如下的链接（几句 yum 轻松搞定）
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager