rake aborted! undefined method `sorcery' for #<Rails::Application::Configuration:0x93a9554>
真的不知道这里有什么问题。我根据说明安装了https://github.com/NoamB/sorcery。
然后我觉得这不是我想要的。做了很多事情,但最终还是决定恢复早先的巫术提交。
麻烦现在我每次尝试播种或迁移数据库时都会收到上述消息。
我已经尝试清空rvm gemset,卸载了巫术宝石,查看了seeds.rb和schema.rb以及Gemfile,我肯定使用了我的应用程序的pre'sorcery'版本。
我甚至尝试删除数据库。 rake db:create工作但是使用rake db:seed返回相同的错误。
这是我第一次使用rails,所以不完全确定发生了什么,'undefined method'返回了如此多的点击,我找不到清晰的调试路径。
微量
/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:in
阻止加载'
/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:in
load'
/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:in
每个'
/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:in
instance_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:in
块中的run_initializers'
/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in each'
/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in
run_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:in
method_missing'
/home/kzu/Development/hub-blog/config/environment.rb:5:in <top (required)>'
/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:103:in
require'
/home/kzu/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:103:in require_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:in call'
/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:in each'
/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:in
invoke_with_call_chain'
/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:205:in block 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:in invoke_prerequisites'
/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:183: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 invoke_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:in
call'
/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:in
每个'
/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in execute'
/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184: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 invoke_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@global/gems/rake-10.0.4/lib/rake/application.rb:143:in invoke_task'
/home/kzu/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in
阻止(2级)顶层'
/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: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:in
top_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:in
standard_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:in
eval'
/home/kzu/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in`
任务:TOP =&gt; db:abort_if_pending_migrations =&gt;环境
答案 0 :(得分:2)
您的app文件夹中仍然有一个sorcery.rb文件,在config / initializer中可以检查一下吗?