我尝试安装设备但遇到了很多迁移问题,所以继续并卸载了gem。我尝试运行rake:db migrate,redo,reset和drop,即使没有Devise,我仍然会收到此错误:
/Users/ashleighalmeida/mixi/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant Devise (NameError)
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/ashleighalmeida/mixi/config/environment.rb:5:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:92:in `preload'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
如何从迁移中彻底删除Devise?谢谢!
答案 0 :(得分:1)
好像你忘了删除Devise初始化程序,它位于:
config/initializers/devise.rb