I am running JRuby version 1.6.7 with Rails 3.2.3 and when I launch my rails server rails s I get the following error:
/config/routes.rb:8: syntax error, unexpected ':'
match '/about', to: 'pages#about'
However, if I change to match '/about' :to => 'pages#about' I don’t get the error. Since this shorthand format is supported in the version of Rails in use, what is the problem and how do I resolve it?
The hash syntax comes from Ruby implementations, not Rails. JRuby can run in either 1.9 or 1.8 mode. It runs in 1.8 mode by default. You can read about configuring JRuby to run in 1.9 mode on the wiki.