升级到Rails 4.2问题

rwi*_*ams 4 ruby ruby-on-rails ruby-on-rails-4.2

我正在尝试从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)
Run Code Online (Sandbox Code Playgroud)

Mik*_*itt 8

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

gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2'
Run Code Online (Sandbox Code Playgroud)

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