`method_missing':无法将Configatron :: Store转换为数组(Configatron :: Store#to_ary给出Configatron :: Store)(TypeError)

时间:2018-07-18 17:26:38

标签: ruby-on-rails configatron

我遇到了以下configatron(版本3.0.2)。我无法提供一个gemfile,因为该项目是私有的。但是,这是堆栈跟踪。是否有人熟悉此错误``method_missing'':无法将Configatron :: Store转换为数组(Configatron :: Store#to_ary给出Configatron :: Store)(TypeError)`?

有人知道我该怎么做才能解决此错误吗?

/Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/configatron-3.0.2/lib/configatron/store.rb:81:in `method_missing': can't convert Configatron::Store to Array (Configatron::Store#to_ary gives Configatron::Store) (TypeError)
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/core_ext/hash/deep_merge.rb:22:in `deep_merge!'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/core_ext/hash/deep_merge.rb:17:in `deep_merge'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/paperclip-4.3.6/lib/paperclip/has_attached_file.rb:82:in `add_required_validations'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/paperclip-4.3.6/lib/paperclip/has_attached_file.rb:21:in `define'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/paperclip-4.3.6/lib/paperclip/has_attached_file.rb:4:in `define_on'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/paperclip-4.3.6/lib/paperclip.rb:194:in `has_attached_file'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom-cms/app/models/my_custom-cms/cms/post.rb:18:in `<class:Post>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom-cms/app/models/my_custom-cms/cms/post.rb:2:in `<module:Cms>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom-cms/app/models/my_custom-cms/cms/post.rb:1:in `<top (required)>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:457:in `load'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:457:in `block in load_file'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:647:in `new_constants_in'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:456:in `load_file'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:354:in `require_or_load'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:494:in `load_missing_constant'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
    from /Users/robertpeterjewell/code/projects/my_project/app/models/my_custom-cms/cms/post_decorator.rb:1:in `<top (required)>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `block in load'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom_frontend/config/initializers/decorators_loader.rb:4:in `block (2 levels) in <top (required)>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom_frontend/config/initializers/decorators_loader.rb:3:in `glob'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/bundler/gems/my_custom_frontend/config/initializers/decorators_loader.rb:3:in `block in <top (required)>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:446:in `instance_exec'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:446:in `block in make_lambda'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:192:in `call'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:192:in `block in simple'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `call'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `block in call'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `each'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `call'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in `_run_prepare_callbacks'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.10/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.10/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/robertpeterjewell/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!'
    from /Users/robertpeterjewell/code/projects/my_project/config/environment.rb:5:in `<top (required)>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
    from /Users/robertpeterjewell/code/projects/my_project/config.ru:44:in `block in <main>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/builder.rb:55:in `initialize'
    from /Users/robertpeterjewell/code/projects/my_project/config.ru:in `new'
    from /Users/robertpeterjewell/code/projects/my_project/config.ru:in `<main>'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/builder.rb:49:in `eval'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/builder.rb:40:in `parse_file'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/server.rb:300:in `build_app_and_options_from_config'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/server.rb:209:in `app'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/server.rb:61:in `app'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/rack-1.6.10/lib/rack/server.rb:337:in `wrapped_app'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/server.rb:139:in `log_to_stdout'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/server.rb:78:in `start'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:80:in `block in server'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/robertpeterjewell/.rvm/gems/ruby-2.2.1/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'


  [1]: https://github.com/markbates/configatron

0 个答案:

没有答案