<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - syntax error, unexpected ':', expecting '=']]></title>
		<link>http://railsforum.com/viewtopic.php?id=52235</link>
		<description><![CDATA[The most recent posts in syntax error, unexpected ':', expecting '='.]]></description>
		<lastBuildDate>Wed, 30 Jan 2013 16:09:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[syntax error, unexpected ':', expecting '=']]></title>
			<link>http://railsforum.com/viewtopic.php?pid=158677#p158677</link>
			<description><![CDATA[<p>I&#039;ve been trying to build a Rails 3.2.11 site since last night and every time I attempt to use the formatting/convention</p><div class="codebox"><pre><code>parameter: value</code></pre></div><p>I continue to get the error in the title of this post. I don&#039;t get it. For example, I added a &quot;slug&quot; column to my Pages model and have set up some validation (from this Railscast: <a href="http://railscasts.com/episodes/63-model-name-in-url-revised?view=asciicast)">http://railscasts.com/episodes/63-model &#133; asciicast)</a> and this validation line is causing the error:</p><div class="codebox"><pre><code>validates :slug, uniqueness: true, presence: true</code></pre></div><p>And any time I try to update the existing Pages in the console, I get this error:</p><div class="codebox"><pre><code>SyntaxError: /Users/kkerley/Documents/www/kkerley.com/app/models/page.rb:4: syntax error, unexpected &#039;:&#039;, expecting kEND
  validates :slug, uniqueness: true, prescence: true
                              ^
/Users/kkerley/Documents/www/kkerley.com/app/models/page.rb:4: Can&#039;t assign to true
  validates :slug, uniqueness: true, prescence: true
                                    ^
/Users/kkerley/Documents/www/kkerley.com/app/models/page.rb:4: syntax error, unexpected &#039;:&#039;, expecting &#039;=&#039;
  validates :slug, uniqueness: true, prescence: true</code></pre></div><p>I&#039;m using Ruby 1.8.7. Is this why? Is that convention something new added in 1.9.x or something? At this point, that&#039;s the only thing that makes any sense to me.</p><br /><p>EDIT: And I have since updated &quot;presence&quot; to be spelled correctly but the errors persist.</p><p>EDIT 2: I installed RVM and upgraded to the latest Ruby 1.9.3 version and now all&#039;s working as expected.</p>]]></description>
			<author><![CDATA[dummy@example.com (klyrish)]]></author>
			<pubDate>Wed, 30 Jan 2013 16:09:12 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=158677#p158677</guid>
		</item>
	</channel>
</rss>
