当我将rails的版本从6.0.4
升级到7.0.1
时,我也升级了一些依赖项的gem。之后,当我启动Rails服务器时,一个错误弹出
1: from /home/developer/.rvm/gems/ruby-2.7.7/gems/activeadmin-2.12.0/lib/active_admin/base_controller/authorization.rb:2:in `<main>' /home/developer/.rvm/gems/ruby-2.7.7/gems/activeadmin-2.12.0/lib/active_admin/base_controller/authorization.rb:3:in `\<module:ActiveAdmin\>': uninitialized constant InheritedResources::Base (NameError)
我在gemfile
中做了一些修改
管理员
gem "font-awesome-rails"
gem "coffee-rails"
gem 'rails_admin', '\~\> 3.0.0'
gem 'activeadmin'#, '\~\> 2.12.0'
gem 'active_admin_role', '\~\> 0.2.1'
gem 'responsive_active_admin', '\~\> 0.0.6'
gem 'activeadmin_addons'
gem 'pundit'
gem 'sassc-rails'
gem 'inherited_resources', '\~\> 1.11'
1条答案
按热度按时间k5ifujac1#
我在这里找到了解决办法。https://github.com/activeadmin/activeadmin/issues/7196
单位:
config/initializers/active_admin_extensions.rb
改变这个
到
PS:你的文件名可以不一样