I am using watchr to watch and compile my stylus and haml files, but as soon as I run the watchr command, I get an error message saying: <main>: undefined method watch' for main:Object (NoMethodError)
.
My watchr.rb file looks like this
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]
}
How do I fix this problem? Can it be fixed?