I am getting the following error when trying to start my Rails application in production for the first time:
/var/www/railsapp/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end ...sion_store :cookie_store, key: '_intranet_session' ^
I have read that this could be an issue with the current ruby version, so I installed RVM and updated the running version.
**root@rails ~#** ruby -v ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02 **root@rails ~#** rvm use 1.9.3 Using /usr/local/rvm/gems/ruby-1.9.3-p125 **root@rails ~#** ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
I notice that the production version of Ruby is 1.9.3p125 but the development version is 1.9.3p0, not sure if that matters.
I then double checked the Rails version was the correct one:
**root@rails www/railsapp#** rails -v Rails 3.1.4
I thought it would be worth restarting the server and then the application just for giggles but that didn't help either.
When reading a few other questions I noticed that if RVM isn't installed then running 'rvm list known' would fail, so I tested it:
**root@rails www/railsapp#** rvm list known # MRI Rubies [ruby-]1.8.6[-p420] [ruby-]1.8.7[-p358] [ruby-]1.8.7-head [ruby-]1.9.1[-p431] [ruby-]1.9.2-p180 [ruby-]1.9.2-p290 [ruby-]1.9.2[-p318] [ruby-]1.9.2-head [ruby-]1.9.3-preview1 [ruby-]1.9.3-rc1 [ruby-]1.9.3-p0 [ruby-]1.9.3[-p125] [ruby-]1.9.3-head ruby-head # GoRuby goruby # TheCodeShop - MRI experimental patches tcs # JRuby jruby-1.2.0 jruby-1.3.1 jruby-1.4.0 jruby-1.6.5 /usr/local/rvm/config/known
If it helps I am running the Turnkey Linux Rails appliance (TurnKey Linux 11.3 / Ubuntu 10.04 Lucid LTS).
I'm at a bit of a dead end of what to try, and advice would be greatly appreciated!