vendredi 12 novembre 2021

uninitialized constant Rails::Plugin::Authorization when run `rake db:migrate`

I was populating a rails application fedena database with the command rake db:migrate, I am getting an error:

rake aborted! uninitialized constant Rails::Plugin::Authorization

when I tried to run the rake command with --trace I got the following:

** Execute environment
rake aborted!
uninitialized constant Rails::Plugin::Authorization
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing'
/mnt/c/users/usrx/Documents/myapp/app/vendor/plugins/acts_as_multi_school/init.rb:15:in `evaluate_init_rb'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/initializer.rb:369:in `load_plugins'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/initializer.rb:165:in `process'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
/mnt/c/users/userx/Documents/myapp/app/config/environment.rb:5
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `gem_original_require'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/tasks/misc.rake:4
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rake-0.8.7/bin/rake:31
/usr/local/rvm/gems/ruby-1.8.7-head/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.8.7-head/bin/rake:19
/usr/local/rvm/gems/ruby-1.8.7-head/bin/ruby_executable_hooks:22

I think the line causing the error is in the file init.rb which is:

Authorization::AUTH_DSL_FILES << "#{RAILS_ROOT}/vendor/plugins/acts_as_multi_school/config/acts_as_multi_school_auth.rb"

and I do not know how can this be solved!

Aucun commentaire:

Enregistrer un commentaire