我一直在将旧版应用程序迁移到更新版本的 rails 中。我现在遇到的问题是,当我尝试启动控制台时出现此错误:
$ rails c
/home/user/.rvm/gems/ruby-2.3.3/gems/actionpack-5.2.5/lib/action_dispatch/middleware/stack.rb:108:in `assert_index': No such middleware to insert after: "ActionDispatch::DebugExceptions" (RuntimeError)
from /home/user/.rvm/gems/ruby-2.3.3/gems/actionpack-5.2.5/lib/action_dispatch/middleware/stack.rb:82:in `insert_after'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/configuration.rb:71:in `block in merge_into'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/configuration.rb:70:in `each'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/configuration.rb:70:in `merge_into'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/engine.rb:509:in `block in app'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/engine.rb:506:in `synchronize'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/engine.rb:506:in `app'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/initializable.rb:32:in `instance_exec'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/initializable.rb:32:in `run'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/initializable.rb:61:in `block in run_initializers'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /usr/share/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/initializable.rb:60:in `run_initializers'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/application.rb:361:in `initialize!'
from /home/user/Projects/firelight/firelight/config/environment.rb:5:in `<main>'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/user/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
from /home/user/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/user/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/application.rb:337:in `require_environment!'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/command/actions.rb:28:in `require_environment!'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:95:in `perform'
from /home/user/.rvm/gems/ruby-2.3.3/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /home/user/.rvm/gems/ruby-2.3.3/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /home/user/.rvm/gems/ruby-2.3.3/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/command/base.rb:69:in `perform'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/command.rb:46:in `invoke'
from /home/user/.rvm/gems/ruby-2.3.3/gems/railties-5.2.5/lib/rails/commands.rb:18:in `<main>'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/user/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from bin/rails:4:in `<main>'
我现在正在使用带有 ruby 2.3.3 的 Rails 5.2.5。错误堆栈跟踪没有告诉我任何重要的事情,至少没有我可以确定的事情。
我能否请教一些关于哪里可以看的好地方?
编辑:我链接到一个有答案的帖子。基本上,如果发生此错误,一个好方法是查看 gem 以查看是否有特定的 gem 需要升级。