How to Convert ERB Files to Slim in a Rails App

Install this gem:

gem install html2slim


Then run the command:

erb2slim <file or directory>  -d


This will convert the files and contents of the files and then remove the ERB files. For the full list of options, check out the gem page.