服务器启动时发生奇怪错误,请查看日志
umair-2:game-minion umairejaz$ rails server /Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 Could not load SystemTimer >= v1.2.0. Falling back to timeout.rb. SystemTimer is STRONGLY recommended for timeouts in Ruby 1.8.7. See http://ph7spot.com/blog/system-timer-1-2-release for details. => Booting WEBrick => Rails 3.0.7 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Exiting /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 1, col 24: ` allow_dynamic_fields: true' (ArgumentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load' from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.20/lib/mongoid/railtie.rb:53 from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in `instance_exec' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in `run' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:50:in `run_initializers' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:in `each' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:in `run_initializers' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:134:in `initialize!' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `send' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing' from /Users/umairejaz/Projects/game-minion/config/environment.rb:5 from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require' from /Users/umairejaz/Projects/game-minion/config.ru:3 from /Library/Ruby/Gems/1.8/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval' from /Library/Ruby/Gems/1.8/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize' from /Users/umairejaz/Projects/game-minion/config.ru:1:in `new' from /Users/umairejaz/Projects/game-minion/config.ru:1
答案 0 :(得分:1)
检查配置文件夹下的任何YAML文件,特别是其中包含allow_dynamic_fields
设置的文件。它可能是在该特定行上方,下方或上方的错误。删除任何无关的空格并重新格式化(即使用制表符或空格,而不是两者)。检查是否存在任何其他混乱或无关的关键字。