× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Very basic: "syntax error, unexpected '=', expecting end-of-input"

Simone Carletti
Mar 21, 2015
<p>The code is correct. In fact, here's the ouput on my machine.</p> <pre><code>2.1.5 :001 &gt; x = 2 =&gt; 2 2.1.5 :002 &gt; print "This application is running okay if 2 + 2 = #{x + x}" This application is running okay if 2 + 2 = 4 =&gt; nil </code></pre> <p>A possible explanation is a syntax error caused by the use of "curly quotes" <code>”</code> in your code, rather than the standard quote <code>"</code>.</p> <pre><code>print “This application is running okay if 2 + 2 = #{x + x}” </code></pre> <p>This is a special character that will not be interpreted as a string opener and could cause your script to fail.</p> <p>This tip was originally posted on <a href="http://stackoverflow.com/questions/28435106/Very%20basic:%20%22syntax%20error,%20unexpected%20'=',%20expecting%20end-of-input%22/28435270">Stack Overflow</a>.</p>
comments powered by Disqus