热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

升级到Rails4.2问题-UpgradingtoRails4.2issues

ImtryingtoupgradetoRails4.2fromRails4.1.9andwhenIattempttoruntheconsoleortheser

I'm trying to upgrade to Rails 4.2 from Rails 4.1.9 and when I attempt to run the console or the server i get the following error. Any thoughts? I thought the html-scanner gem was included with Action::View

我正在尝试从Rails 4.1.9升级到Rails 4.2,当我尝试运行控制台或服务器时,我收到以下错误。有什么想法吗?我认为html-scanner gem包含在Action :: View中

gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- action_view/vendor/html-scanner (LoadError)

2 个解决方案

#1


8  

The OP's issue (and mine) was to do with an incompatibility in the prototype-rails gem. This can be fixed by using the "4.2" branch of prototype-rails directly from github. Modify your Gemfile entry as follows:

OP的问题(以及我的问题)与prototype-rails gem中的不兼容性有关。这可以通过直接从github使用prototype-rails的“4.2”分支来解决。修改您的Gemfile条目,如下所示:

gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2'

Note that the prototype-rails gem will not be supported from Rails 5 onwards, so now would be as good a time as any to remove this dependency.

请注意,从Rails 5开始不支持prototype-rails gem,因此现在可以像删除此依赖项一样好。

#2


3  

I believe they removed html-scanner from rails in 4.2 when they switched to rails-html-sanitizer according to the upgrade guide but it seems you can use the rails-deprecated_sanitizer gem to your Gemfile to then re-include the html-scanner library

我相信他们根据升级指南切换到rails-html-sanitizer时会从4.2中删除html-scanner但是看起来你可以使用rails-deprecated_sanitizer gem到你的Gemfile然后重新包含html-scanner库

gem 'rails-deprecated_sanitizer'

Hope this helps!

希望这可以帮助!


推荐阅读
author-avatar
波罗蜜
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有