Learning Ruby ERB Templates
<p>I'm trying to learn Ruby ERB Templates using the following guide:
<a href="http://www.stuartellis.name/articles/erb/" rel="nofollow">Tutorial Link</a></p>

<p>I am on the "very simple example" section with the following code:</p>

<pre><code>require 'erb'

weekday = Time.now.strftime('%A')
simple_template = "Today is &lt;%= weekday %&gt;."

renderer = ERB.new(simple_template)
puts output = renderer.result()
</code></pre>

<p>I wanted to run this code to generate an html file so I created a file called </p>

<pre><code>testing.html.erb
</code></pre>

<p>and ran the code with the following command:</p>

<pre><code>erb testing.html.erb &gt; new-file.html
</code></pre>

<p>When I did that through the terminal several errors popped up and the html file that was generated was blank.  Here are the errors that I received:
<a href="https://i.stack.imgur.com/9QHu0.png" rel="nofollow"><img src="https://i.stack.imgur.com/9QHu0.png" alt="enter image description here"></a></p>

<p>I was hoping someone could tell me what i was doing wrong.  Am I forgetting something? Or am I not running the erb command correctly? Any help would be greatly appreciated. Thanks! </p>