NameError(未初始化的常量ActiveSupport::ParameterFilter):如何修复



我在应用程序中创建了Comment函数。

我把这个上传到了github。

然后我没有上传vendor(忽略vendor(和git-rm-chached-r vendor/bundle2。

也许我这样做了,我在应用程序中看不到帖子视图。

错误是(在浏览器中(

NameError in PostsController#index
uninitialized constant ActiveSupport::ParameterFilter
Extracted source (around line #80):
78  # If the constant was actually loaded, something else went wrong?
79  raise(e) if from_mod.const_defined?(const_name)
80  CoreExt::ActiveSupport.without_bootsnap_cache { super }
81  end
82
83  # Signature has changed a few times over the years; easiest to not

错误日志是

NameError (uninitialized constant ActiveSupport::ParameterFilter):
vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in `block in load_missing_constant'
vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active
.
.
.

引用这篇文章(https://github.com/aserafin/grape_logging/issues/66)但它不会起作用。

有人知道这个错误吗?

谢谢你读到这篇文章。

在尝试了几个解决方案但没有成功之后,例如引用的解决方案(https://github.com/aserafin/grape_logging/issues/66),我将rails版本从5.2.4.3更新到6.0.3,它解决了我的问题。

最新更新