未定义的方法“alias_method_chain”将 Spree 从 3.2 更新到 3.3

undefined method `alias_method_chain' updating Spree from 3.2 to 3.3

https://guides.spreecommerce.org/developer/upgrades/three-dot-two-to-three-dot-three.html 按照步骤从 3.2 升级后,我尝试 运行 Spree 3.3 时遇到错误。 我更新了 Gemfile,运行 bundle update,然后安装了迁移。由于同样的错误,我什至无法 运行 迁移:

/Users/vasco/.rvm/gems/ruby-2.4.9/gems/multi_fetch_fragments-0.0.17/lib/multi_fetch_fragments.rb:5:in `block in <module:MultiFetchFragments>': undefined method `alias_method_chain' for ActionView::PartialRenderer:Class (NoMethodError)
Did you mean?  alias_method
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/activesupport-5.1.7/lib/active_support/concern.rb:120:in `class_eval'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/activesupport-5.1.7/lib/active_support/concern.rb:120:in `append_features'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/multi_fetch_fragments-0.0.17/lib/multi_fetch_fragments.rb:95:in `include'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/multi_fetch_fragments-0.0.17/lib/multi_fetch_fragments.rb:95:in `block (2 levels) in <class:Railtie>'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/multi_fetch_fragments-0.0.17/lib/multi_fetch_fragments.rb:94:in `class_eval'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/multi_fetch_fragments-0.0.17/lib/multi_fetch_fragments.rb:94:in `block in <class:Railtie>'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/initializable.rb:30:in `run'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/initializable.rb:59:in `block in run_initializers'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:347:in `each'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:347:in `call'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
    from /Users/vasco/.rvm/rubies/ruby-2.4.9/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/initializable.rb:58:in `run_initializers'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/application.rb:353:in `initialize!'
    from /Users/vasco/Documents/rails/hello-coffee/config/environment.rb:5:in `<top (required)>'
    from config.ru:3:in `require_relative'
    from config.ru:3:in `block in <main>'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:24:in `app'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:80:in `log_to_stdout'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:42:in `start'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:135:in `block in perform'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `tap'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `perform'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/command/base.rb:63:in `perform'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/command.rb:44:in `invoke'
    from /Users/vasco/.rvm/gems/ruby-2.4.9/gems/railties-5.1.7/lib/rails/commands.rb:16:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

我在 Ruby 2.4.9Bundler 2.1.4Rails 5.1.7Spree 3.3.6。这是我的 Gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.1.0'
gem 'pg'
# gem 'sqlite3'
gem 'activerecord-nulldb-adapter'
gem 'puma'
gem 'sass-rails'
gem 'uglifier'
# gem 'therubyracer', platforms: :ruby
gem 'coffee-rails'
gem 'turbolinks'
gem 'jbuilder'
gem 'jquery-rails'
gem "jquery-ui-rails"

group :development, :test do
  gem 'byebug'
  gem 'capybara'
  gem 'selenium-webdriver'
end

group :development do
  gem 'web-console'
  gem 'listen'
  gem 'spring'
  gem 'spring-watcher-listen'
  gem 'annotate'
end

gem 'dotenv-rails'
gem 'simple_form'
gem 'hamlit'
gem 'browser'
gem 'font-awesome-rails'

gem 'spree', '~> 3.3.0'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'
gem 'spree_social', github: 'spree-contrib/spree_social'
gem 'spree_paypal_express', github: 'spree-contrib/better_spree_paypal_express'

gem 'braintree'

gem 'daemons'
gem 'delayed_job_active_record'
gem 'devise-async'
gem 'whenever', require: false
gem 'multi_fetch_fragments'
gem 'prowl'
gem 'redis'
gem 'i18n_data'
gem 'http_accept_language'
gem 'chartkick'
gem 'groupdate'
gem 'exception_notification'
gem 'sitemap_generator'
gem 'redcarpet'
gem 'roo'
gem 'roo-xls'
gem 'inky-rb', require: 'inky'
gem "business_time"
gem "holidays"
gem 'ancestry'
gem 'sortable_tree_rails'
gem 'friendly_id'
gem 'globalize'
gem 'maxminddb'
gem 'rb-readline'
gem 'rest-client'
gem 'aws-sdk'
gem 'aws-sdk-rails'
gem 'fog-aws'
gem 'asset_sync'
gem 'savon'

我该如何解决这个问题?

对于遇到此问题的任何其他人,multi_fetch_fragments gem 已合并到 rails 5 本身,因此行

gem 'multi_fetch_fragments'

在我的 Gemfile 中是罪魁祸首。资料来源: https://github.com/n8/multi_fetch_fragments/issues/34 and https://github.com/rails/rails/pull/18948

从我的 Gemfile 中删除此 gem 后错误消失了。