Rails 3.0.5 中没有 deprecated_block_helpers

发布于 2024-10-26 23:51:23 字数 2048 浏览 0 评论 0 原文

当我尝试在 Rails 3.0.5 上启动生产服务器时,我不断收到此错误:

/var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `const_get': no such file to load -- action_view/helpers/deprecated_block_helpers (LoadError)
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:68:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:68:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:86:in `local_constant_names'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:100:in `new_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:91:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:91:in `new_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:599:in `new_constants_in'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /home/punkweek/punkweek/config.ru:3
    from /var/lib/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
    from /var/lib/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
    from /home/punkweek/punkweek/config.ru:1:in `new'
    from /home/punkweek/punkweek/config.ru:1

似乎文件 deprecated_block_helpers 有问题,在 Rails 中找不到该文件。有人知道如何解决这个问题吗?

When I'm trying to launch my production server on Rails 3.0.5, I keep getting this error:

/var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `const_get': no such file to load -- action_view/helpers/deprecated_block_helpers (LoadError)
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:68:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:68:in `local_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/core_ext/module/introspection.rb:86:in `local_constant_names'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:100:in `new_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:91:in `each'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:91:in `new_constants'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:599:in `new_constants_in'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /var/lib/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /home/punkweek/punkweek/config.ru:3
    from /var/lib/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
    from /var/lib/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
    from /home/punkweek/punkweek/config.ru:1:in `new'
    from /home/punkweek/punkweek/config.ru:1

It seems there's a problem with a file, deprecated_block_helpers, which is not found in Rails. Anyone knows how to solve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜唯美灬不弃 2024-11-02 23:51:23

实际上这是 Rails 3.0.5 中的一个错误(已在 Edge 中修复)。

DeprecatedBlockHelpers 在 ActionView::Helpers 中自动加载,但文件本身已在 9de8305

这个助手 中删除旨在显示使用 <% %> 而不是 <%= %> (或 - 而不是对于某些块,= in haml)。我不确定弃用到底是针对哪些块,但也许可以查看一下您的模板,看看是否可以通过反复试验来使其正​​常工作。

或者,您可以供应 Rails 并删除 DeprecatedBlockHelpers 自动加载,或跟踪边缘 Rails。

Actually this is a bug in Rails 3.0.5 (it has been fixed in edge).

DeprecatedBlockHelpers is autoloaded in ActionView::Helpers, but the file itself was removed in 9de8305

This helper was designed to show a deprecation notice for using <% %> instead of <%= %> (or - instead of = in haml) for certain blocks. I'm not sure exactly which blocks the deprecation is for, but maybe take a look through your templates and see if you can trial-and-error this into working.

Alternatively, you can vendor Rails and remove the DeprecatedBlockHelpers autoload, or track edge Rails.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文