【发布时间】:2017-05-31 03:48:21
【问题描述】:
我的环境是 macOS,我没有 Windows 环境。我正在写一篇关于 Byebug 的博客文章,我想知道它是否完全支持 Windows。这是我得到的信息:
可能不行?
- Rails 5 为 byebug gem 添加了
platform: :mri选项。 (see here) - this document 说 mri 不包括 Windows。
- 我听说有人说某些命令(例如
restart)在他们的 Windows PC 中不起作用。 - 所以 Byebug 不支持 Windows?
可以吗?
- CI 测试正在通过 Windows 环境。(see here)
- 我在Byebug's README 中找不到 Windows 环境的任何限制。
- 那么 Byebug 支持 Windows?
我不确定哪个想法是正确的。有人知道吗?
更新
@deivid 说 Byebug 支持 Windows。那么,Gemfile 的有效平台选项是什么?
:platforms => [:mri, :mingw, :x64_mingw] 或 :platforms => [:mri, :mswin]?
以下是从this page 中提取的选项。
- ruby => C Ruby (MRI) 或 Rubinius,但不是 Windows
- mri => 与 ruby 相同,但与 Rubinius 不同
- rbx => 与 ruby 相同,但只有 Rubinius(不是 MRI)
- jruby => JRuby
- mswin => 窗口
- mingw => Windows 32 位“mingw32”平台(又名 RubyInstaller)
- x64_mingw => Windows 64 位“mingw32”平台(又名 RubyInstaller x64)
mswin 和 mingw 是完全不同的东西。
mswin 似乎是这些包:
https://www.artonx.org/data/asr/
Byebug CI 只针对 mingw 和 x64_mingw 运行,所以我猜应该是 :platforms => [:mri, :mingw, :x64_mingw],对吗?
【问题讨论】:
-
它适用于 Windows 上的 Ruby 2.5。我安装了 Msys2 工具链来构建原生扩展