Search code examples
ruby-on-railssyntax-errorcookiestorerack-pow

SyntaxError on the welcome to rails screen using Pow


I have just set up a new project which displays all the correct info in the about your applications environment window when on http://localhost:3000/ but when I run it at http://egg.dev/ I get:

SyntaxError: /users/davidhall/work/egg/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end
...sion_store :cookie_store, key: '_egg_session'
                              ^

I'm sure I had this problem earlier, which was due to me using rails 3.1 with ruby 1.8.7, the problem resolved when I used ruby 1.9.2. Now I'm getting when using 1.9.2 too.

Thanks for any help its much appreciated!


Solution

  • As you can read in the Pow User's Manual under point 2.3 you have to add a .rvmrc into the root directory of your project with the content rvm 1.9.2. Then it should work!