0
rake aborted! undefined method `sorcery' for #<Rails::Application::Configuration:0x93a9554>

真的不知道这里有什么问题。我按照说明安装了https://github.com/NoamB/sorcery 。

然后我决定这不是我想要的。做了大量的工作,但最终还是决定恢复到更早的巫术前提交。

问题是现在我每次尝试播种或迁移数据库时都会收到上述消息。

我已经尝试清空 rvm gemset,卸载魔法 gem,查看了 seed.rb 和 schema.rb 以及 Gemfile,我肯定在使用我的应用程序的预“魔法”版本。

我什至尝试删除分贝。rake db:create 工作但使用 rake db:seed 返回相同的错误。

这是我第一次使用 Rails,所以不完全确定发生了什么,“未定义的方法”返回了这么多命中,我找不到清晰的调试路径。

痕迹

/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configuration.rb:85:in method_missing' /home/kzu/Development/hub-blog/config/initializers/sorcery.rb:5:in' /home/kzu/.rvm/gems/ ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in load' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:inblock in load' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems /activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:inload' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/ engine.rb:588:in block (2 levels) in <class:Engine>' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:587:ineach' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:587:in block in <class:Engine>' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:ininstance_exec' /home /kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in run' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:inblock in run_initializers' /home/kzu/.rvm/gems/ruby -1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:ineach' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:inrun_initializers' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:136:in initialize!' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:inmethod_missing' /home/kzu/Development/hub-博客<top (required)>' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:103:in/config/environment.rb:5:in 需要'/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:103:inrequire_environment!' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:297:in块(2 级)在 initialize_tasks' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:incall' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in块中执行' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:ineach' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in执行' /home/kzu/.rvm/ gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in block in invoke_with_call_chain' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:ininvoke_with_call_chain' /home/kzu/.rvm/gems/ruby-1.9.3-p392 @global/gems/rake-10.0.4/lib/rake/task.rb:205:inblock in invoke_prerequisites' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:203:in每个' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:203:ininvoke_prerequisites' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:183:in块 in invoke_with_call_chain' /home/kzu/ .rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in调用'/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:ininvoke_with_call_chain' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in调用' /home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:346:in block (2 levels) in <top (required)>' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:incall' /home/kzu/.rvm /gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in block in execute' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:ineach' /home/kzu/.rvm/gems/ruby-1.9.3- p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:execute' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:ininvoke_with_call_chain'/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake 中的块-10.0.4/lib/rake/task.rb:177:ininvoke_with_call_chain' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:ininvoke_task' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in块(2 级)在 top_level' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in each' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:inblock in top_level ' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in run_with_threads' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:intop_level' /home/kzu/.rvm/ gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in block in run' /home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:instandard_exception_handling' /home/kzu/.rvm/gems/ruby-1.9.3-p392 @global/gems/rake-10.0.4/lib/rake/application.rb:70:in run' /home/kzu/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:ineval' /home/kzu/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in ` ' 任务:TOP => db:abort_if_pending_migrations => 环境

4

1 回答 1

3

看来您的应用程序文件夹中仍有一个 sorcery.rb 文件,在 config/initializer 中,您能检查一下吗?

于 2013-05-05T11:29:03.337 回答