【发布时间】:2019-02-22 10:36:09
【问题描述】:
我正在尝试使用 Guard 来监控 AsciiDoctor 文件中的更改。这是官方文档中的 Guardfile:
require 'asciidoctor'
guard 'shell' do
watch(/^mydoc\.adoc$/) {|m|
Asciidoctor.convert_file m[0]
}
end
它对我有用。但现在,我尝试在不创建 Guardfile 的情况下启动相同的操作 - 即我只想在 Windows cmd.exe 中编写这些命令。
但是当我写require 'asciidoctor' 命令提示符给我一个错误:
'require' 不是内部或外部命令、可运行程序或批处理文件。
好吧,我知道此类错误消息通常与 Windows %Path% 环境变量有关。但我不明白如何在这种特殊情况下解决它。
【问题讨论】:
标签: ruby windows cmd guard asciidoctor