0

我在 Windows 系统上安装了 JRuby 9.2.11.1。安装成功完成后,不存在 core/stdlib 的 ri 文档。例如:

C:\>ri Array
Nothing known about Array

我试过这个解决方案如何安装 Ruby ri 文档?(诚​​然,对于 Ruby Installer,而不是 JRuby)无济于事。尝试运行后,rdoc --all --ri我收到以下错误消息:

Before reporting this, could you check that the file you're documenting
has proper syntax:

  C:/jruby-9.2.11.1/bin/jruby.exe -c NEWS

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NameError) undefined local variable or method `console' for IO:Class
Did you mean?  console_size

(注:安装的 RDoc gem 版本为 6.1.2)

4

1 回答 1

0

我发现:JRuby 版本io/console似乎不适用于 Windows 命令提示符:https ://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/io/console/jruby.rb .

例如,一种解决方案是rdoc --all --riWindows Git Bash而不是命令提示符中发出命令。

于 2020-04-29T21:50:04.683 回答