I’m following Mike Hartl’s rails tutorial and created a simple app using rails 3.2.8.
The “rails console” command blew up; a little tinkering revealed that my ruby environment had mysteriously reverted to ruby 1.8.7. (Why is not yet understood.) The error message:
…path…/lib/active_support/dependencies.rb:245 in ‘load’: …path…/demoapp/config/initializers/sessions_store.rb:3: syntax error, unexpected ‘:’, expecting $end (SyntaxError)
A quick switch back to ruby 1.9.3p194 (using RVM) seems to have done the trick. My dev platform is Ubuntu 12.04.
As usual the Rails error message stack is less than helpful. What is the difference between 1.8.7 and 1.9.3 that causes this error?
The line that does not work in 1.8 is
It uses new hash notation. To make it working for 1.8 change it to