Topic: syntax error, unexpected ':', expecting '='

I've been trying to build a Rails 3.2.11 site since last night and every time I attempt to use the formatting/convention

parameter: value

I continue to get the error in the title of this post. I don't get it. For example, I added a "slug" column to my Pages model and have set up some validation (from this Railscast: … asciicast) and this validation line is causing the error:

validates :slug, uniqueness: true, presence: true

And any time I try to update the existing Pages in the console, I get this error:

SyntaxError: /Users/kkerley/Documents/www/ syntax error, unexpected ':', expecting kEND
  validates :slug, uniqueness: true, prescence: true
/Users/kkerley/Documents/www/ Can't assign to true
  validates :slug, uniqueness: true, prescence: true
/Users/kkerley/Documents/www/ syntax error, unexpected ':', expecting '='
  validates :slug, uniqueness: true, prescence: true

I'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's the only thing that makes any sense to me.

EDIT: And I have since updated "presence" to be spelled correctly but the errors persist.

EDIT 2: I installed RVM and upgraded to the latest Ruby 1.9.3 version and now all's working as expected.

Last edited by klyrish (2013-01-30 14:03:31)