无法在 RedHat 中安装/识别 Javascript 运行时(适用于 Rails 3.1)
尝试在运行 RedHat(64 位)的专用机器上设置生产部署:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
在我的一生中,我无法安装 Javascript 运行时和/或被我的 Rails 3.1.0rc6 应用程序识别。
我已经完成了 execjs、therubyracer、libv8 和 Mustang 的 gem 安装...重新启动后仍然出现此错误:
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 但仍然出现此错误。
有什么想法吗?
Trying to setup a production deployment on a dedicated box running RedHat (64bit):
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
For the life of me, I can't get a Javascript Runtime installed and/or recognized by my Rails 3.1.0rc6 app.
I've done a gem install of execjs, therubyracer, libv8, and mustang ... still get this error after restarting:
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)):
Also installed node.js but still get this error.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道解决方案是什么,但也许这会有所帮助:
错误是从 ExecJS 此处。如果安装了
therubyracer
gem,则应该通过require "v8"
行检测到它 此处。您可以从
irb
成功要求“v8”
吗?如果是这样,那么这就告诉您 Rails 正在以某种方式在另一组不同的 gem 上运行。你用的是rvm吗?I don't know what the solution is, but maybe this will help:
The error is being thrown from ExecJS here. If
therubyracer
gem is installed, then it should be detected by the linerequire "v8"
here.Can you
require "v8"
successfully fromirb
? If so, then that tells you that Rails is being run on a different set of gems somehow. Are you using rvm?