gpt4 book ai didi

Javascript 运行时不包含在默认 Gemfile 中

转载 作者:行者123 更新时间:2023-11-28 02:04:53 25 4
gpt4 key购买 nike

我使用的是 Rails 3.2.9 和 ruby​​ 1.9.3

当我做

rails new blog

并尝试生成 Controller

rails g controller auth

它总是抛出错误:

 Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

我总是返回并使用 ruby​​racer gem( 或 here 上提供的 JavaScript 运行时之一编辑 Gemfile 。为什么其中一个 javascript 运行时没有作为默认 gem 包含在最初生成的 Gemfile 中?有什么具体原因吗?

最佳答案

您可能已经在广泛的系统中安装了 js-runtime。例如,如果你在linux中安装node.js,你将拥有js-runtime,并且不需要向你的Gemfile添加任何内容

关于Javascript 运行时不包含在默认 Gemfile 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17912657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com