我正在使用watchr来监视和编译我的手写笔和haml文件,但只要我运行watchr命令,我就会收到一条错误消息:<main>: undefined method watch' for main:Object (NoMethodError)。我的watchr.rb文件如下所示
def compile_haml
%x[haml index.haml ../index.html]
end
def compile_stylus
%x[stylus style.styl -o ../style.css]
end
watch( "index.haml" ) { |x|
%x[haml index.haml ../index.html]
}
watch( "style.styl" ) { |x|
%x[stylus style.styl -o ../style.css]
}如何解决此问题?它能被修复吗?
发布于 2016-08-01 21:53:00
我认为将文件重命名为watchr.watchr应该可以解决这个问题。
$ watchr watchr.watchrhttps://stackoverflow.com/questions/38685965
复制相似问题