Puma发现了这个错误:未定义的方法`call' for:debug:Symbol

时间:2017-08-17 07:38:26

标签: ruby-on-rails ruby puma

我的rails应用程序是5.1.2。一切都很好,直到今天我在rails s时出现了这个错误。

Use Ctrl-C to stop
2017-08-17 10:49:28 +0800: Rack app error handling request { GET / }
#<NoMethodError: undefined method `call' for :debug:Symbol
Did you mean?  caller>
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/reporting.rb:21:in `block (2 levels) in warn'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/reporting.rb:21:in `each'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/reporting.rb:21:in `block in warn'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/reporting.rb:20:in `tap'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/reporting.rb:20:in `warn'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/instance_delegator.rb:20:in `warn'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.2/lib/active_support/deprecation/instance_delegator.rb:27:in `warn'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:506:in `validate_secret_key_config!'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:247:in `env_config'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:692:in `build_request'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:518:in `build_request'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:521:in `call'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run'
/Users/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
2017-08-17 10:49:28 +0800: Rack app error handling request { GET /favicon.ico }
#<NoMethodError: undefined method `call' for :debug:Symbol
Did you mean?  caller>

尝试了我能想到的一切:

  • 降级至rails 5.1.0
  • 将红宝石版本切换为2.3.3或2.3.4

仍然没有运气。

感谢任何帮助。如果您需要更多信息,请与我们联系。

谢谢!

1 个答案:

答案 0 :(得分:0)

看起来数据库已经以某种方式损坏了。

自开发以来,我只是rake db:drop db:create db:setup db:seed

希望这有助于某人。

谢谢。

更新

我又遇到了这个问题。请注意我自己。

仔细检查 .env文件。