我在Windows系统上安装了JRuby 9.2.11.1。安装成功完成后,就不存在core/stdlib的ri文档了。例如:
C:>ri Array
Nothing known about Array
我尝试了这个解决方案如何安装Ruby ri文档?(无可否认,对于Ruby安装程序,而不是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(
我发现:io/console
的JRuby版本似乎不能很好地与Windows命令提示符配合使用:https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/io/console/jruby.rb.
例如,解决方案是在Windows Git Bash中发出rdoc --all --ri
命令,而不是命令提示符。