/usr/local/bundle/gems/devise-4.8.0/lib/devise.rb:321:in `ref': undefined method `reference' for ActiveSupport::Dependencies:Module (NoMethodError)
web_1 | from /usr/local/bundle/gems/devise-4.8.0/lib/devise.rb:340:in `mailer='
web_1 | from /usr/local/bundle/gems/devise-4.8.0/lib/devise.rb:342:in `<module:Devise>'
web_1 | from /usr/local/bundle/gems/devise-4.8.0/lib/devise.rb:11:in `<main>'
web_1 | from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
web_1 | from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
web_1 | from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
web_1 | from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
web_1 | from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
web_1 | from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler/runtime.rb:66:in `block (2 levels) in require'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler/runtime.rb:61:in `each'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler/runtime.rb:61:in `block in require'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler/runtime.rb:50:in `each'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler/runtime.rb:50:in `require'
web_1 | from /usr/local/lib/ruby/3.0.0/bundler.rb:174:in `require'
如果你能帮助我,我会感激
错误的错误
设计的版本您正在使用调用一种名为
reference
def self.ref(arg)
ActiveSupport::Dependencies.reference(arg)
Getter.new(arg)
end
该方法存在于Rails 6:
https://github.com/rails/rails/blob/6-0-stable/activeupport/lib/active_support/depperencies.rb#l651-l653在Rails 7中已删除: https://github.com/rails/rails/blob/main/activeupport/lib/active_support/deppencortencies.rb
这条线从铁路7.0.0.Alpha1 ChangElog解释。 protivate内部类别的ActiveSupport ::依赖项已被删除,例如ActiveSupport :: Dependencies ::参考,ActiveSupport :: Dependencies :: dependencies :: Blookable等。
https://github.com/rails/rails/blob/main/activeupport/changelog.md#rails-700alpha1-september-15-2021 fix:升级设计 devise已发行了与Rails 7的4.8.1
版本。运行bundle update devise
此修复程序修复了我的错误:
GEM“设计”,Github:“ Strobilomyces/Deakise”,分支:“ Patch-1”
https://github.com/heartcombo/devise/pull/5397devise已经将此问题与Rails 7合并到其主要分支机构。在发布新版本后,您可以指出设计宝石在您的Gemfile中使用GitHub的主要分支:
我已经升级了轨道6.1至7.2。 我正在错误 .rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in`require':无法加载此类文件-Devise_helper(loaderror)