我正在使用 Rails 服务器,没有任何问题 ubuntu 12.04。但我想在终端上的控制台尝试一些方法,我使用
rails console
命令。但它不起作用。输出在这里:
/var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load': /home/mehmet/www/tutorial/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_tutorial_session'
^
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:588
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `send'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/mehmet/www/tutorial/config/environment.rb:5
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require_environment!'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:40
from script/rails:6:in `require'
from script/rails:6
mehmet@vefanet:~/www/tutorial$ rails console
/var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load': /home/mehmet/www/tutorial/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_tutorial_session'
^
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/lib/gems/1.8/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:588
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `send'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/mehmet/www/tutorial/config/environment.rb:5
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require_environment!'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:40
from script/rails:6:in `require'
from script/rails:6
那么,你有什么想法吗?我该怎么办?