Rails 5 升级:没有这样的中间件要插入之后:ActionDispatch::ParamsParser (RuntimeError)

Rails 5 Upgrade: No such middleware to insert after: ActionDispatch::ParamsParser (RuntimeError)

我正在将开发中的应用程序从 Rails 4.2 升级到 Rails 5 beta1.1。应用程序在升级前运行良好。我已经完成了基本的升级步骤(更新 Ruby、更新 Rails 以及相关步骤:http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html)。 Gemfile 也已更新为最新的 Gems。

当我 运行 $ rails 中间件或 $ rails 控制台或 $ rails 服务器时,我收到以下错误:

No such middleware to insert after: ActionDispatch::ParamsParser
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/actionpack/lib/action_dispatch/middleware/stack.rb:108:in `assert_index'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/actionpack/lib/action_dispatch/middleware/stack.rb:80:in `insert_after'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/configuration.rb:69:in `block in merge_into'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/configuration.rb:68:in `each'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/configuration.rb:68:in `merge_into'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/engine.rb:507:in `block in app'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/engine.rb:504:in `synchronize'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/engine.rb:504:in `app'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/application/finisher.rb:34:in `block in <module:Finisher>'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/initializable.rb:30:in `instance_exec'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/initializable.rb:30:in `run'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/initializable.rb:54:in `run_initializers'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/application.rb:350:in `initialize!'
.../config/environment.rb:5:in `<top (required)>'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/activesupport/lib/active_support/dependencies.rb:302:in `require'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/activesupport/lib/active_support/dependencies.rb:302:in `block in require'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/activesupport/lib/active_support/dependencies.rb:268:in `load_dependency'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/activesupport/lib/active_support/dependencies.rb:302:in `require'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/application.rb:326:in `require_environment!'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/application.rb:446:in `block in run_tasks_blocks'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/command.rb:20:in `run'
.../.rvm/gems/ruby-2.3.0/bundler/gems/rails-dbf67b3a6f54/railties/lib/rails/commands.rb:19:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

这与 ActionDispatch::ParamsParser 已从 Rails 5 beta 中间件 (https://github.com/rails/rails/commit/38d2bf5fd1f3e014f2397898d371c339baa627b1) 中删除有关。但是,在某种程度上,我的应用程序似乎仍在寻找它。

我在 config/application.rb 中用 ActionDispatch::ParamsParser 尝试过各种方法,例如删除它,当那不起作用时,我也尝试添加它。同样的错误。有什么办法可以克服这个错误吗?

我认为此错误是由 Rails 尚未更新的 gem 引起的 5. 我一直在使用 gem 远程部分 (https://github.com/JangoSteve/remotipart) .这非常有帮助。当我从 gem 文件中删除它时,问题中指出的错误消失了。