lundi 1 avril 2019

NoMethodError: undefined method `setup' for Devise:Module

Environment

  • Ruby [1.9.3p547]
  • Rails [3.2.22.5]
  • Devise [3.0.4]

Current behavior

When i try to run any rake or rails command, i am getting below error

rake aborted! NoMethodError: undefined method setup' for Devise:Module /home/tatva/sites/Quotiful-API-master/config/initializers/devise.rb:3:in' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in load' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:inblock in load' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in load_dependency' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:inload' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/engine.rb:593:in block (2 levels) in <class:Engine>' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/engine.rb:592:ineach' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in block in <class:Engine>' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:ininstance_exec' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in run' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/initializable.rb:55:inblock in run_initializers' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in each' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:inrun_initializers' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/application.rb:136:in initialize!' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/railtie/configurable.rb:30:inmethod_missing' /home/tatva/sites/Quotiful-API-master/config/environment.rb:5:in <top (required)>' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:inrequire' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in block in require' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:inload_dependency' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in require' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/application.rb:103:inrequire_environment!' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/railties-3.2.22.5/lib/rails/application.rb:305:in block (2 levels) in initialize_tasks' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/gems/rake-12.2.1/exe/rake:27:in' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/bin/ruby_executable_hooks:24:in eval' /home/tatva/.rvm/gems/ruby-1.9.3-p547@quotiful/bin/ruby_executable_hooks:24:in' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)

Expected behavior

Why i am getting this error. is this version issue of devise? I don't want to upgrade devise version as it will effect whole project.

Please help me to resolve this issue. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire