0

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?

ALEX
  • 64
  • 1
  • 6

1 Answers1

0

I think renaming the file to watchr.watchr should fix it.

$ watchr watchr.watchr
avellable
  • 1,365
  • 3
  • 13
  • 17