突然间,我无法使用 rails -s

问题描述

昨晚我按照此链接 http://railsapps.github.io/installrubyonrails-ubuntu.html 中的说明在我的 Ubuntu 系统上安装了 ruby​​ 3.0.0 和 ruby​​ on rails 6.1.1,并且我能够使用命令在端口 3000 上的浏览​​器中运行 rails导轨 -s。今天我尝试让它再次运行,但我收到了这个 rails aborted 错误。我完全被这个问题搞糊涂了,因为我没有更改任何设置,因为昨晚它工作得很好。我已经看到其他问题提出了类似的问题,但不是我的具体错误,所以我不确定如何继续。我尝试创建一个单独的目录并为一个单独的项目创建一个新的 gemset,但我得到了同样的错误。有人有什么想法吗?

rails aborted!
LoadError: cannot load such file -- rexml/document
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox.rb:22:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/webdrivers-4.5.0/lib/webdrivers/geckodriver.rb:72:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/webdrivers-4.5.0/lib/webdrivers.rb:4:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/who/workspace/proj/config/application.rb:7:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
/home/who/workspace/proj/Rakefile:4:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:326:in `block in load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:326:in `load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/railties-6.1.1/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/railties-6.1.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/railties-6.1.1/lib/rails/command.rb:52:in `invoke'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/railties-6.1.1/lib/rails/commands.rb:18:in `<main>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
/home/who/workspace/proj/bin/rails:5:in `<top (required)>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
/home/who/.rvm/gems/ruby-3.0.0@proj/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
<internal:/home/who/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/home/who/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/home/who/workspace/proj/bin/spring:10:in `block in <top (required)>'
<internal:kernel>:90:in `tap'
/home/who/workspace/proj/bin/spring:7:in `<top (required)>'
bin/rails:2:in `load'
bin/rails:2:in `<main>'
(See full trace by running task with --trace)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)