0

当我在 Aptana Studio 的内置命令行中发出命令$ rails s时,它会出现此错误,我不知道如何修复该项目可以在https://github.com/nathandunn97/sample_app找到

=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load': /home/nathan/Documents/Aptana Studio 3 Workspace/sample
_application/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_sample_application_session'
                              ^
        from /var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
        from /var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/engine.rb:588
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/engine.rb:587:in `each'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/engine.rb:587
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `run_initializers'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `send'
        from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /home/nathan/Documents/Aptana Studio 3 Workspace/sample_application/config/environment.rb:5
        from /home/nathan/Documents/Aptana Studio 3 Workspace/sample_application/config.ru:4:in `require'
        from /home/nathan/Documents/Aptana Studio 3 Workspace/sample_application/config.ru:4
        from /var/lib/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
        from /var/lib/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
        from /home/nathan/Documents/Aptana Studio 3 Workspace/sample_application/config.ru:1:in `new'
        from /home/nathan/Documents/Aptana Studio 3 Workspace/sample_application/config.ru:1
4

1 回答 1

0

新的 ruby​​ 哈希语法 ( key:) 仅适用于 ruby​​ 1.9 及更高版本。从您的日志中我们可以看出您使用的是 1.8 版本。

于 2012-08-31T19:37:31.493 回答