centos下 安装node.js,(解决ruby项目runtime error)

来源:互联网 发布:点明安卓读屏软件 编辑:程序博客网 时间:2024/06/05 11:33

前言: ruby项目运行,需要一个js runtime,一般在gemfile里有这个gem

# See https://github.com/rails/execjs#readme for more supported runtimesgem 'therubyracer', platforms: :ruby

如果装了这个gem,就不用再额外配置js运行环境,(但是据说这个gem会影响内存占用,可以在系统中安装node.js来解决)

在root下,

yum install epel-release
yum install nodejs
node  -v

这样就可以了

以上是32位系统,64位请按照以下安装

# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm# rpm -ivh epel-release-7-5.noarch.rpm
yum install nodejs



 

0 0
原创粉丝点击