1

这很可怕,但是我花了大约一周的时间开发一个应用程序,并且在运行“Rails S”命令时遇到了以下错误。我的应用似乎不想再启动了。

我相信在精彩的 Stackoverflow 社区的帮助下,我们可以解决这个问题!

编辑:我想我会包括我的 GitHub 来衡量 - https://github.com/Apane/Startupblog

参数错误

      Received wrong number of arguments. [#<Logger:0x007fe8d56bb280 
    @progname="omniauth", @level=0, @default_formatter=#<Logger::Formatter:0x007fe8d56bb230
     @datetime_format=nil>, @formatter=#<Logger::SimpleFormatter:0x007fe8d56bb140  
     @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x007fe8d56bb1e0 @shift_size=nil, 
    @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @mutex=#
    <Logger::LogDevice::LogDeviceMutex:0x007fe8d56bb1b8 @mon_owner=nil,  
    @mon_count=0, @mon_mutex=# <Mutex:0x007fe8d56bb168>>>>]

完整跟踪:

omniauth (1.1.3) lib/omniauth/strategy.rb:136:in `initialize'
rack (1.4.5) lib/rack/builder.rb:82:in `new'
rack (1.4.5) lib/rack/builder.rb:82:in `block in use'
rack (1.4.5) lib/rack/builder.rb:130:in `[]'
rack (1.4.5) lib/rack/builder.rb:130:in `block in to_app'
rack (1.4.5) lib/rack/builder.rb:130:in `each'
rack (1.4.5) lib/rack/builder.rb:130:in `inject'
rack (1.4.5) lib/rack/builder.rb:130:in `to_app'
omniauth (1.1.3) lib/omniauth/builder.rb:48:in `call'
warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
warden (1.2.1) lib/warden/manager.rb:34:in `catch'
warden (1.2.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__1918359078568265758__call__4170314405657891017__callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.11) lib/rails/engine.rb:479:in `call'
railties (3.2.11) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
4

1 回答 1

2

您的问题实际上是语法错误,看起来像是在您将omniauth 添加到项目时引入的。在您的omniauth 初始化程序的第3 行有一个尾随逗号。摆脱它,你应该没事。

于 2013-02-27T04:31:17.263 回答