I\'m writing a command-line tool that will ultimately output an HTML report. The tool is written in Ruby. (I am not using Rails). I\'m trying to keep the logic of the applic
From within my .erb file, I had to do this:
<%= ERB.new(File.read('pathToFile/myFile.erb'), nil, nil, '_sub01').result(binding) %>
The other answers in this thread assumed you had a variable with your content in it. This version retrieves the content.