在安装了 libv8 的 Windows 上安装 therubyracer --with-system-v8

2023-12-23

我终于在我的 Windows 上安装了 libv8 gem install libv8 -- --with-system-v8

现在,当我尝试安装 therubyracer 时,我得到了

gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb --with-system-v8
checking for main() in -lpthread... no
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby193/bin/ruby
        --with-pthreadlib
        --without-pthreadlib
        --enable-debug
        --disable-debug
        --with-v8-dir
        --without-v8-dir
        --with-v8-include
        --without-v8-include=${v8-dir}/include
        --with-v8-lib
        --without-v8-lib=${v8-dir}/
C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in `configure': You hav
e chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

我想知道这个错误消息的真正含义是什么? 我也查了这个https://github.com/cowboyd/libv8#bring-your-own-v8 https://github.com/cowboyd/libv8#bring-your-own-v8如何安装 v8 的标头?


当我遇到这个问题时,我发现我在开发中不需要这些gem,因为rails用于预编译你的资产,所以我的解决方案非常简单,

Gemfile

gem "rails"

group :production do
  gem 'therubyracer'
end

然后当你捆绑运行这个命令

$ bundle install --without production

然后对生活微笑:D

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在安装了 libv8 的 Windows 上安装 therubyracer --with-system-v8 的相关文章

  • Jekyll for GitHub Pages 在 Windows 上找不到 rouge

    我刚刚在 Windows 上安装了 Jekyll 我正在尝试使语法突出显示与 rouge 一起使用 我已经设定highlighter rouge在 config yml 上 在文件 posts 2015 08 13 my first pos
  • Mongoid - 同一外域的两个域的逆

    我试图让以下 Mongoid 关系发挥作用 但每个团队的游戏字段都是一个空数组 这不是一个有效的关系模型吗 我是否需要分开比赛 即主场比赛和客场比赛 class Team include Mongoid Document has many
  • 如何阻止与 RSpec 和 Capybara 的外部连接?

    在我的 Rails 项目中 我想编写非理想条件的测试 例如缺乏互联网连接或超时 例如 我正在使用 gem 来联系 API 并且希望确保在我的应用程序和外部 API 之间存在连接问题时能够正确处理错误 我已经可以通过用录像机制作固定装置并从
  • 每个进程每个线程的时间量

    我有一个关于 Windows 和 Linux 中进程和线程的时间量子的问题 我知道操作系统通常为每个线程提供固定的时间量 我知道时间量根据前台或后台线程而变化 也可能根据进程的优先级而变化 每个进程有固定的时间量吗 例如 如果操作系统为每个
  • Windows平台下C语言控制串口DTR和RTS引脚

    如何在windows平台上控制串口的DTR和RTS引脚 我希望通过升高或降低电压来对其进行位敲击或操作 您需要使用EscapeComm 函数 https learn microsoft com en us windows desktop a
  • 使用 Windows 命令行连接文本文件,删除前导行

    我需要连接一些相对较大的文本文件 并且更喜欢通过命令行来完成此操作 不幸的是我只有Windows 无法安装新软件 type file1 txt file2 txt gt out txt 允许我几乎得到我想要的 但我不希望 file2 txt
  • Ruby 中的并行赋值运算符

    我正在查看 Ruby 编程 书中的一个示例 def fib up to max i1 i2 1 1 parallel assignment i1 1 and i2 1 while i1 lt max yield i1 i1 i2 i2 i1
  • 捆绑安装无法从 https://rubygems.org/ 获取规格

    我正在尝试遵循 Hartl Rails 教程 但在使用捆绑器 gem 时遇到了问题 使用命令 bundle install 或 bundle update 时 我得到以下输出 从中获取源索引https rubygems org https
  • 有没有人有 Ruby 和 Rake 的 Notepad++ 函数列表插件的解析规则

    我使用 Notepad 编辑 rake 文件 并且希望能够使用函数列表插件 我无法在线找到任何解析规则 并且 语言解析规则 对话框没有非常清晰的记录 我正在将方法解析到以下列表中 但还想显示任务 Function Begin t def t
  • 如何在子 shell 中运行 cmd.exe 批处理文件

    我有一个批处理文件 通常像这样调用 longjob cmd gt result txt 2 gt 1 这工作正常 但脚本在执行过程中更改了目录 将我的 shell 留在该目录中 这很麻烦 有没有办法在子 shell 中运行命令 同时仍然允许
  • Ruby 枚举器中的“break”与“raise StopIteration”

    如果我使用 Ruby Enumerators 来实现生成器和过滤器 generator Enumerator new do y x 0 loop do y lt lt x x 1 break if x gt CUTOFF end end l
  • 如何获取Windows批处理的父文件夹

    我正在编写一个批处理文件 我需要获取该bat文件的父文件夹 有可能吗 注意 我的意思是批处理文件的父文件夹 而不是调用该批处理的提示的当前目录 Thanks 批处理的父文件夹位于变量中 dp0位于 例子 echo off setlocal
  • yard 0.7.3 无法在 Markdown 和 Textile 中构建我的自述文件

    我决定将我的项目中的 README 文件转换为 Markdown 并一直使用yard 验证文档是否正确呈现 所以我安装了 rdiscount 将 README 更改为 README md 并尝试 yard doc README md 这给了
  • Boost + Visual Studio 2010 + Windows 平台 SDK 7.1

    有人可以告诉我 bjam 的命令行开关或其他可以使用新的 Windows Platform SDK 7 1 工具链使用 VS2010 进行 boost 编译的东西吗 您可以在普通的视觉工作室项目中设置该选项 默认值是 v100 是平台 7
  • 如何从 Ruby 程序发送邮件?

    我想从 Ruby 应用程序发送电子邮件 核心语言中是否有调用来执行此操作 或者是否有我应该使用的库 最好的方法是什么 如果你不想使用行动邮递员 http wiki rubyonrails org rails pages ActionMail
  • Rails 控制台无法运行

    rbenv 红宝石版本 2 6 6 导轨版本 5 1 4 我正在较旧的代码库中工作 ruby 2 6 6 rails 5 4 1 这是我每天使用的代码库 我必须通过 rbenv 下载一个新的 ruby 版本作为单独的存储库 这样做在我的旧代
  • Heroku 部署错误

    在 Windows 环境中 尝试部署到 Heroku 时出现以下错误 C Ruby lib ruby gems 1 8 gems heroku 1 9 13 lib heroku commands base rb 32 in 没有这样的文件
  • Rails/Nginx 中的超时——最佳实践

    我正在开发一个应该在 Nginx 服务器上运行的 Rails 应用程序 根据输入 应用程序可能需要很长时间来处理请求 或者在出现错误时挂起 因此我想防止进程永远运行 除了确保客户端收到超时信号的 Nginx 配置之外 我想我可能仍然需要确保
  • 使用 Windows 批处理文件在文本文件中添加新行

    我有一个文本文件 其中有 200 多行 我只想在第 4 行之前添加一个新行 我使用的是 Windows XP 输入前的示例文本文件 header 1 header 2 header 3 details 1 details 2 输出后 hea
  • MinGW Make 抛出“系统找不到指定的路径。”错误

    我正在尝试在 Windows 7 上使用 cmake 生成一个 c 项目 在实际创建项目之前 cmake 会对您的工具链进行快速测试 我正在使用 MinGW 这就是我的问题所在 Cmake 触发 make 构建 最终失败并返回 系统找不到指

随机推荐