require "pry" namespace :secondbureau do desc "change erb to haml" task :erb_to_haml do current_folder = Rake.application.original_dir Dir.glob('app/views/**/*.erb').each do |item| puts "generate #{current_folder}/#{item[0..-4]}haml" system "html2haml #{current_folder}/#{item} #{current_folder}/#{item[0..-4]}haml" system "rm #{current_folder}/#{item}" end end end