无法在RedHat中安装/识别Javascript运行时(适用于Rails 3.1)

Can't Get a Javascript Runtime Installed/Recognized in RedHat (for Rails 3.1)

本文关键字:适用于 运行时 Rails Javascript 识别 RedHat 安装      更新时间:2023-09-26

尝试在运行RedHat(64位)的专用机器上设置生产部署:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

对于我的生活,我不能得到一个Javascript运行时安装和/或识别我的Rails 3.1.0rc6应用程序。

我已经做了一个gem安装execjs, therubyracer, libv8和mustang…重新启动后仍然出现这个错误:

ActionView::Template::Error (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
  (in /var/www/demo-setup/releases/20110825184931/app/assets/javascripts/demos.js.coffee)):

也安装了node.js,但仍然得到这个错误。

任何想法?

我不知道解决方案是什么,但也许这会有所帮助:

错误是从ExecJS抛出的。如果安装了therubyracer gem,那么应该在这里的require "v8"行中检测到它。

你能从irb成功地得到require "v8"吗?如果是这样,那么它告诉您Rails以某种方式运行在另一组宝石上。您正在使用rvm吗?