2013-05-05 43 views
0
rake aborted! undefined method `sorcery' for #<Rails::Application::Configuration:0x93a9554> 

真的不知道這裏出了什麼問題。按照說明安裝https://github.com/NoamB/sorceryrake中止!未定義的方法`sorcery'|| rvm rails db:種子錯誤

然後我決定它不是我想要的。完成了很多虛張聲勢,但最終只是決定恢復到早期的前巫術提交。

麻煩現在我每次嘗試種子或遷移數據庫時都會收到上述消息。

我已經嘗試清空rvm gemset,卸載魔法寶石,看過seeds.rb和schema.rb以及Gemfile,我絕對使用我的應用程序的pre'sorcery'版本。

我甚至嘗試刪除數據庫。耙db:創建工作,但回到與耙db:種子相同的錯誤。

這是我第一次使用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:in block in load' /home/kzu /。 rvm/gems/ruby​​-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:在load_dependency' /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/railties-3.2.13/lib/rails/engine.rb:588:在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:在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 block in run_initializers' /home/kzu/.rvm/gems/ruby​​-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:在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:在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需要' /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 block(2 levels)in initialize_tasks' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:246:in call' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:246:in執行中的塊' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:241:in each' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:241:in執行' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:184:block in invoke_with_call_chain' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:177:in invoke_with_call_chain' /home/kzu/.rvm/ gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:205:在block in invoke_prerequisites' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:203:in每個' /home/kzu/.rvm/gems/ruby-1.9.3 [email protected]/gems/rake-10.0.4/lib/rake/task.rb:203:在invoke_prerequisites' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:183:in block in invoke_with_call_chain' /home/kzu/.rvm/gems/[email protected]/ gems/rake-10.0.4/lib/rake/task.rb:177:invoke_with_call_chain' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:170:in invoke' /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/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:246:in call' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:246:in block in execute' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:241:in each' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:241:在invoke_with_call_chain' /home/kzu /中的execute' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:184:in塊中。rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:177:invoke_with_call_chain' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/task.rb:170:in invoke' /home/kzu/.rvm/gems/ruby-1.9 .3-p392 @ global/gems/rake-10.0.4/lib/rake/application.rb:143:在invoke_task' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/application.rb:101:in block(2級)in top_level' /home/kzu/.rvm/gems/ruby-1.9。 [email protected]/gems/rake-10.0.4/lib/rake/application.rb:101:each' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/application.rb:101:in top_level' /home/kzu/.rvm/gems/[email protected] /gems/rake-10.0.4/lib/rake/application.rb:110:in run_with_threads' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/application.rb:95:in top_level' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0。 4/lib/rake/application.rb:73:在block in run' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling' /home/kzu/.rvm/gems/[email protected]/gems/rake-10.0.4/lib/rake/application .rb:70:run' /home/kzu/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in eval' /home/kzu/.rvm /寶石/紅寶石1.9.3-P392 /斌/ ruby​​_noexec_wrapper:14:`」 任務:TOP => DB:abort_if_pending_migrations =>環境

回答

2

看來你還是有sorcery.rb文件你的應用程序文件夾,在config/initializer中,你可以檢查一下嗎?

+0

男人謝謝你停下來。我確實有這個文件遺留下來。我認爲,因爲我從來沒有犯過它,它不會被git分支的變化所觸動 - 事情的方式是什麼? – happilyUnStuck 2013-05-05 11:46:22

+0

如果您沒有提交文件並執行git存儲,只會刪除您提交的文件中的修改。任何已創建的文件夾或文件將被留下,以刪除未提交的文件,您必須執行git clean -f -d,這將刪除所有未提交的文件和目錄(-f用於文件,-d用於目錄) – 2013-05-05 11:50:39

相關問題