【问题标题】:Byebug fully supports Windows or not?Byebug 是否完全支持 Windows?
【发布时间】: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)

this comment:

mswin 和 mingw 是完全不同的东西。

mswin 似乎是这些包:

https://www.artonx.org/data/asr/

Byebug CI 只针对 mingw 和 x64_mingw 运行,所以我猜应该是 :platforms => [:mri, :mingw, :x64_mingw],对吗?

【问题讨论】:

  • 它适用于 Windows 上的 Ruby 2.5。我安装了 Msys2 工具链来构建原​​生扩展

标签: ruby windows byebug


【解决方案1】:

gem 'byebug', platform: [:mri, :mingw, :x64_mingw]

byebug 现在正在开发我的 Windows Rails 应用程序。这在所选答案中并不明显。

【讨论】:

  • 请记住它可以工作......但它是垃圾所以我放弃了。无法使用 bash 历史记录,我通常在 Linux 上执行的任何操作通常都会在 Windows 上崩溃 byebug。箭头键等。学习 Vagrant 和启动 VM 更容易。
【解决方案2】:

是的,byebug 支持 Windows。

Rails 5 为 byebug gem 添加了 platform: :mri 选项。 (见这里)

添加该补丁时可能会忽略 Windows 平台。

而且这个文件说 mri 不包括 Windows。

没错。

我听说有些人说某些命令(例如重新启动)在他们的 Windows PC 中不起作用。

这些人应该向项目报告这些问题。

CI 测试正在通过 Windows 环境。(请参阅此处)

没错,最好的支持指标;)

我在 Byebug 的 README 中找不到对 Windows 环境的任何限制。

另一个很好的指标:)

【讨论】:

  • 感谢您的回复。那么 Gemfile 的有效选项是什么? (我更新了我的问题。)
  • 对不起,我不知道byebugmswin平台上是否有效。我想这是一个尝试的问题......
  • 我明白了。那么我认为mswin不应该被包括在内,因为它没有测试。
猜你喜欢
  • 1970-01-01
  • 2014-04-20
  • 1970-01-01
  • 1970-01-01
  • 2022-07-19
  • 1970-01-01
  • 2015-11-28
  • 2018-07-14
  • 2015-10-10
相关资源
最近更新 更多