Just drop this in your rails root folder and run it.
class ToHaml def initialize(path) @path = path end def convert! Dir["#{@path}/**/*.erb"].each do |file| `html2haml -rx #{file} #{file.gsub(/\.erb$/, '.haml')}` end end end path = File.join(File.dirname(__FILE__), 'app', 'views') ToHaml.new(path).convert!